API Documentation

Welcome to the PICTraq API Documentation

This webpage serves as a repository for all of the available database calls available to developers of herd recording systems. The provided endpoints can be used to send data for animal events.

Test and Production URLs

Use https://traqtest.genusplc.com/API/ to test calls. Once you are comfortable using the API and the calls, you can use production data at https://pictraq.genusplc.com/API/.

Consuming the API

In short, each link on the left has a resource URL to make a POST request to. With the exception of the 'Auth/Logon' procedure, which provides an authentication token, each call will require the following:

  • An authorization token. Most calls will reject a request unless this is provided and valid.
    Send this as a Authorization header with the value Bearer $authToken, where `$authToken` is the value returned upon logging in.
  • Each call has a set of input parameters, listed under the input parameters table.
    The datatype represents what kind of value you should send. Typings are generally not rigidly enforced, however.
    The only exception to this is the `array` value type, which expects an array of data. Most http libraries will handle this automatically. If it does not, you'll need to send post data as such: ($param being the parameter)
                    
                      key       value
                      -------   -----
      
                      $param[] = 'foo'
                      $param[] = 'bar'
                      $param[] = 'baz'