AGRIS Customer Documentation

Greenstone Data Hub - API Partner Connection requirements and Partner, onboarding steps and usage limits.

Note: If you are a vendor or an AGRIS customer and have not completed this process, please contact your account manager before continuing.

Instructions

API Documentation

Greenstone provides sample documentation for supported API’s. Customers and business partners can use the documentation to see how our existing API’s produce transactions within AGRIS. 

View Sample API’s →

API’s examples that might be part of your project may include access to one of the following or others:

  • Work Orders 

  • Commodity Contracts

  • Name Id

  • Farms

  • Fields

 

Our API’s are built on the REST (REpresentational State Transfer) architecture and require a specific authentication token that is unique for each provider and customer using our API’s.

Greenstone requires a User ID to be present when integrating with our API’s. This information will be used to identify the users who are creating change/integration requests within the Greenstone Data Hub. The User ID is only used for informational purposes and will not be validated.

Authentication Token

Our authentication token expires after 24 hours, instructions below indicate how to refresh a token and best practices on how to store/utilize our tokens

(sample call )

by sending your call to:

https://gdhapps.auth0.com/oauth/token

{
"client_id":"PROVIDED BY GREENSTONE",
"client_secret":"PROVIDED BY GREENSTONE",
"grant_type":"client_credentials",
"audience":"http://localhost/GDH/",
"authority":"https://gdhapps.auth0.com/"
}

The above POST request returns a JWT token which should be kept in the Application cache and sent in the Authorization header of each API request. (See below snap for information)

Our authentication token expires after 24 hours. Refresh the token by reauthenticating it using the payload provided for authenticating. 

USAGE LIMIT:
You should typically not use more than 1 token per day.  This requires that you cache the token for reuse.  We suggest implementing logic to cache the generated token for the day and use that token in subsequent calls until you receive an unauthenticated response from the Greenstone Data Hub. 

To ensure your integration continues to operate please ensure you are not exceeding usage limits, Greenstone reserves the right to deny service from any partner who is not managing token refreshing.

Example using postman.

Get postman here!

Using the Greenstone Data Hub API’s

If you receive an error when calling our API, the message was not received and will be required to be resent.  Common failures will be that the message/parameters are not formatted correctly and did not pass our cursory validation.  Any errors that fail processing into our backend system (AGRIS), an example might be where a vendor doesn’t exist on receiving the transaction, an alert will be generated to the customer’s admin and the ability to reprocess, edit, and delete the message.

You should expect that messages will be processed in the order they are received.

 

 

3820 Mansell Road, Suite 350 ✦ Alpharetta, GA 30022 ✦ www.GreenstoneSystems.com
© 2011 - 2024 Cultura Technologies LLC. All Rights Reserved Worldwide.  Products and company names mentioned herein may be trademarks or registered trademarks of their respective owners.