View on GitHub

easitrace

« Back to Contents

API | Callbacks

When a transaction is sent to EasiTrace, it is validated and then, if it is valid, it is placed on a queue to be processed at the next available time. To get around the need for Applications to poll EasiTrace for a response to the transaction, EasiTrace has the mechanism to push the response back to the application upon completion (success or failure). When setting up an application, you can register several endpoints which will be called upon transaction completion, which will provide the following model of data:

{
  "transactionId": "df283882-eb95-42c0-b6b6-994cf06a8a71",
  "status": "SUCCESS",
  "propertyIdentifier": "00/000/0000",
  "reference": "this is my reference",
  "serviceTag": "BCMS"
}

The ‘status’ property of the response can have one of these values:

Status Description
PENDING The transaction has been successfully queued and is awaiting processing
SENT The transaction has been successfully sent to the movement service and is awaiting a response
SENDFAILED The transaction failed to send to the movement service
FAILED The transaction has failed. See transaction errors and warnings for more details
PARTIALERROR One or more animals in the transaction have errors, but some have been accepted. See transaction and animal errors and warnings for more details
SUCCESS The transaction has successfully been processed