1. Subscribe
Before getting technical,
an annual subscription is needed for the end user (e.g. a trader, grower, agent, transporter).
2. Wait for an e-mail
Floricode will create an account for you on the API.
One time only, you will receive 'client credentials' per e-mail.
This consists of two items:
This is comparable to an username and password, but for applications.
3. Request a token
The 'client credentials' are to be used in the oAuth client credentials flow to receive an access token.
Example:
curl --request POST \
--url https://api.floricode.com/oauth/token \
--header 'accept: application/json' \
--header 'cache-control: no-cache' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'grant_type=client_credentials&client_id=XXXXXX&client_secret=XXXXXX&scope=XXXXXX'
Replace the 'XXXXXX' with the appropiate values.
If succesfull, you'll receiver your token in a response like this:
{
"access_token": "eJG...1LQ",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "XXXX"
}
Save the token and it's expiry time in your application.
4. Use it
Add the token when making calls to the API as http header:
curl --location --request GET 'https://api.floricode.com/v2/VBN/Product?$orderby=change_date_time%20desc&$top=100&$count=true' \
--header 'Authorization: Bearer eJG...1LQ'
5. Done
You've just made your first call to our API