ISC Developer Portal

Overview

The eNVD system is a nationally agreed system that seamlessly transfers electronic livestock integrity data from the consignor (livestock producer) through the supply chain to the intended receivers, and is verified against industry systems data (e.g. PIC, LPA accreditation, NLIS statuses) to deliver improved data integrity.

eNVD API enables 3rd party developers the chance to build native apps, website applications or as a value add on to existing on farm applications.
Full details of the program can be found here

Our API's are REST. Our API has predictable, resource-oriented URLs, and uses HTTP response in combination with API Status codes to indicate API errors. We use built-in HTTP features, like HTTP verbs, which are understood by off-the-shelf HTTP clients. JSON is returned in all API responses including errors. A key feature of the api's is the dynamic nature of how the forms are displayed to the user.
Applications request the structure of how the form should be displayed, which allows new forms and versions to be added without any code changes. To do this we use a new technology called json schema forms which is an open source framework where the principles can be applied to any language.
However, many libraries and repositories have been written for various languages which make using this technology easier. See the JSON Schema Forms section for further information.

API BASE URI

Authorisation

eNVD require clients to use an API key which will allow application users to login
You can then login users from 3 different systems.

  • LPA users - Full read/write access
  • NLIS users - Read access, read/write access for transporters
  • myMLA users - Read/write access for any accounts which are linked. Visit myMLA for more information

Your API key is specific to you and your application. Take reasonable care in the use of your API Key and access details.

You can apply for a API key by emailing technicalsupport@IntegritySystems.com.au.

The NLIS API uses JSON web tokens. When an HTTP POST request is sent to the Auth Server, a valid token is returned or an invalid request. The returned token must then be passed in as a request header with all future requests.

Request Headers

HTTP Header Description Example
Content-type The MIME type of the body of the request Content-Type: application/x-www-form-urlencoded

Request Body

HTTP Body Description Example
Client Id Client identifier of your application client_id=mySuperApp
Client Secret Your client secret assigned client_secret=mysecret
Grant Type We use Password Grant Type grant_type=password
Scope Available values include lpa_scope, nlis_scope, mymla_scope dependent on your user scope=lpa_scope
UserName When the scope is for LPA users, the username is the PIC-userid. Note the - between PIC and userid
When the scope is for NLIS users, the username is your nlis userID.
When the scope is for myMLA users, the username is your registred myMLA email.
username=Q1KK0786-1005672
username=Q1KK0786-1005672
username=9PROD2G0
username=blah@validemailaddress.com
Password The account holders relevant password. Eg LPA, NLIS or myMLA password password=userpassword
Example Header
Content-Type: application/x-www-form-urlencoded    
Example Body
client_id=mySuperApp&client_secret=mysecret&grant_type=password&scope=lpa_scope&username=Q1KK0786-1005672&password=userpassword

Resonse Body

HTTP Body Description Example
access_token The access token returned. "access_token" : "eyJ0eXAiOiJKV1Q..."
expires_in Number of minutes the token will be valid for. "expires_in" : "3600"
token_type The type of token generated by the API. "token_type" : "Bearer"
Example Body
{
  "access_token" : "eyJ0eXAiOiJKV1Q...",
  "expires_in" : "3600",
  "token_type" : "Bearer"
}

If a response code of 200 is returned, it means you have successfully authenticated and can access your token.

If a response code of 400 is returned, it could mean that your api key is invalid by indicating you are an invalid client or your username or password is invalid.

For other response codes, check the message included in the body of the response object.

JSON Schema Forms

JSON Schema Form(JSF) is a concept where JSON Schema and a form format is combined to define user interfaces.
The main advantages of JSON schema forms include :

  • In json-schema-form concept, the form definition is used to define the user interface shown when a user interacts with the data model. This is the last degree of decoupling the data structures from the application logic.
  • Multiple user interfaces can be defined easily
  • New forms can be rolled out to all clients without any coding changes.
  • The schema validates your document.

A UML class diagram expressed in json-schema-form terms is shown below (the generated form is a product of JsonSchemaForm and FormDefinition):

This wiki helps explain the concepts of JSON schema further.
The following github repository has various code libraries for working with JSON schema forms.

Supported Forms and Accreditation

  • LPA Cattle - LPA Accreditation req'd
  • LPA EU Cattle - LPA & EU Accreditation req'd
  • LPA Bobby Calves - LPA Accreditation req'd
  • LPA Sheep and Lambs - LPA Accreditation req'd
  • LPA Goats - LPA Accreditation req'd
  • NFAS delivery docket - LPA & NFAS Accreditation req'd
  • NFAS Form B - LPA & NFAS Accreditation req'd
  • MSA declaration - MSA Accreditation req'd
  • Cattle Health Declaration - No Accreditation
  • Sheep Health Declaration - No Accreditation
  • Goat Health Declaration - No Accreditation
API Access
Form POST GET LOCK DELETE PUT (Quantity) PUT (Part B) PUT (Part C)
LPA Cattle LPA PRODUCER CONSIGNOR, DESTINATION, CONSIGNEE, BUYER CREATOR, DESTINATION, CONSIGNEE CREATOR CREATOR CREATOR NLIS SALEYARD or AGENT*
LPA EU Cattle LPA PRODUCER CONSIGNOR, DESTINATION, CONSIGNEE, BUYER CREATOR, DESTINATION, CONSIGNEE CREATOR CREATOR CREATOR NLIS SALEYARD or AGENT*
LPA Bobby Calves LPA PRODUCER CONSIGNOR, DESTINATION, CONSIGNEE CREATOR, DESTINATION, CONSIGNEE CREATOR CREATOR CREATOR
LPA Sheep and Lambs LPA PRODUCER CONSIGNOR, DESTINATION, CONSIGNEE, BUYER CREATOR, DESTINATION, CONSIGNEE CREATOR CREATOR CREATOR NLIS SALEYARD or AGENT*
LPA Goats LPA PRODUCER CONSIGNOR, DESTINATION, CONSIGNEE, BUYER CREATOR, DESTINATION, CONSIGNEE CREATOR CREATOR CREATOR NLIS SALEYARD or AGENT*
NFAS delivery docket LPA PRODUCER CONSIGNOR, DESTINATION CREATOR, DESTINATION CREATOR CREATOR CREATOR
NFAS Form B LPA PRODUCER CONSIGNOR, DESTINATION CREATOR, DESTINATION CREATOR CREATOR CREATOR
MSA declaration LPA PRODUCER CONSIGNOR, DESTINATION CREATOR, DESTINATION CREATOR CREATOR CREATOR
Cattle Health Declaration LPA PRODUCER CONSIGNOR, DESTINATION, CONSIGNEE CREATOR, DESTINATION, CONSIGNEE CREATOR CREATOR CREATOR
Sheep Health Declaration LPA PRODUCER CONSIGNOR CREATOR CREATOR CREATOR CREATOR
Goat Health Declaration LPA PRODUCER CONSIGNOR CREATOR CREATOR CREATOR CREATOR
* (where user is DESTINATION or CONSIGNEE)
logo Integrity Systems Company