MyOSPRI is our new online portal for electronic Animal Status Declarations (ASDs). In future it will replace NAIT.

At the moment, our APIs allow you to connect directly to our farm-to-farm and farm-to-meat processor ASD services. As we build more features, we’ll offer more APIs.

If you’re integrating with the current NAIT system and want to find out more about our API building schedule, email myospri@ospri.co.nz

Getting started

Explore APIs available

Explore our APIs list to find out which services you’d like to use in your own applications.

Set up Auth0

To use our APIs, you need to use our new identity management service Auth0. You can authorise and get JWT bearer tokens using client ID and client secret credentials. Fill out the form below to set up your Auth0 application and client credentials.

Agree to MyOSPRI terms and conditions

By using our APIs, you agree to our terms and conditions.

We have the right to disable your access if you use MyOSPRI for illegitimate purposes.

Test APIs and access live environment

Once you’re logged in to MyOSPRI, you can manage your test (sandbox) and production environment API access keys. Use the sandbox key and sandbox endpoints in your software development.

Graphic of desktop computer screen with text and an image on it

We provide 3 environments for testing.

Sandbox environment

Description: Non-production test environment that has changes released regularly or on demand.

Base URL: https://sandbox-api.cdcms.nz

Preview environment

Description: Pre-production environment with latest features that are part of the upcoming release.

Base URL: https://preview-api.ospri.co.nz

Partner environment

Description: Post-production environment that has all the features in the production/live environment.

Base URL: https://partner-api.ospri.co.nz

When you've completed testing, use your production keys to access the live environment.

Requests and responses

All requests require an authorisation header containing the bearer token.

All API responses consist of valid Hypertext Application Language (HAL) links that can be used to perform an action.