# Sow Mirrors

Sow mirrors are the equivalent of sows resources but controlled by the integrator.

New sow mirror entries will have their gestal_id updated in the Gestal software the first time they are retrieved, based on a match with the pin_tag attribute.

https://api.gestal.cloud/integration/sow-mirrors

Updating a sow

Be aware that only the pin_tag, rfid1, rfid2,state and state_updated_at can be updated on the Gestal software. Also, to be able to change the state_updated_at, the state has to be the same as its related sow record.

  • To replace breeding date by your state_updated_at , state must be bred or gestating.
  • To replace farrowing date by your state_updated_at , state must be farrowing or farrowed.
  • To replace retired date by your state_updated_at , state must be retired.

Attention

Each modification must be confirmed on the Gestal software before the sow record is updated.

# Parameters

Basic parameters, queries and bulks are supported.

# The sow mirror object

In addition to the common request attributes, the following attributes define the object.

Uniqueness

There can be only one sow mirror object per unique vendor_id.

Attribute Type Required Description Pending
vendor_id string Yes The integrator's unique ID for a sow. No
gestal_id 64 bit integer No The Gestal system unique ID for a sow. No
pin_tag string Yes The visual ID of a sow. No
rfid1 64 bit integer No The first RFID tag. No
rfid2 64 bit integer No The second RFID tag. No
state string No The sow's current state, can be:
gilt, open, cycled, bred, gestating, farrowing, farrowed,weaned, retired or unknown.
No
state_updated_at datetime No Date and time at which the sow's state changed for the last time. No
last_location string No Last known location of the sow. Yes
location_updated_at datetime No Date and time at which the sow last changed location. Yes
section string No The section where the sow is currently in, can be:
breeding, gestation, lactation, growing or unknown.
Yes
parity integer No Parity of the sow. Yes
body_condition integer No Body condition score from 1 to 5: 1=skinny, 2=thin, 3=ideal, 4=fat, 5=obese Yes
genetic string No Genetic of the sow. Yes
birth_at datetime No Date of birth of the sow. Yes
entry_at datetime No Date when the sow entered the site. Yes
tattoo string No The sow's tattoo. Yes
dam string No The sow's mother. Yes
sire string No The sow's father. Yes
adapted boolean No If a sow was adapted or trained into free gestation stalls. Yes
accepted boolean No If a sow is accepted by its peers into free gestation pens. Yes
batch string No The batch of which the sow is currently part of. (ex: a service group or wean group) Yes
notes string No Notes entered by the user about this sow. Yes
deleted_at datetime No Date and time at which the event was deleted. This is used to delete an event in the api. Yes

# Example Response

{
  "cloud_id": "wos_nbocYxWfQeXdI27iD6JeRLl1yKPrYNKF",
  "vendor_id": "70b096b7-047b-41ab-b36c-261f608ea701",
  "gestal_id": null,
  "pin_tag": "1234",
  "rfid1": null,
  "rfid2": null,
  "state": "gilt",
  "state_updated_at": null,
  "last_location": null,
  "location_updated_at": "2019-12-18T19:17:31.713Z",
  "section": "gestation",
  "parity": 11,
  "body_condition": 3,
  "genetic": null,
  "birth_at": "2014-12-31T05:00:00.000Z",
  "entry_at": null,
  "tattoo": "ABCD",
  "dam": null,
  "sire": null,
  "adapted": true,
  "accepted": true,
  "batch": "19-13",
  "notes": "Very good nurse",
  "created_at": "2001-01-01T01:01:01.000Z",
  "updated_at": "2001-01-01T01:01:01.000Z"
}
Last Updated: 8/27/2025, 2:40:38 PM