Skip to main content

System API (1.0.0)

Download OpenAPI specification:Download

files

Upload a file

Upload a file

Authorizations:
jwt
Request Body schema: multipart/form-data
bucket
required
string
Enum: "images" "files" "videos"
type
required
string
Enum: "sample" "avatar" "weighbridge" "contract" "image" "logo" "misc" "vehicle" "terms-conditions" "trade-contract" "rt-certificate"

Name of the different file types in use (contract, sample etc)

file
required
Array of strings <binary>
name
required
string
organisationId
string
organisations
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "tags": [
    ],
  • "info": {
    },
  • "organisationId": "string",
  • "userId": "string",
  • "type": "string",
  • "status": "active"
}

Download a file

Download a file

Authorizations:
jwt
path Parameters
id
required
string

Id of the file to download

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "message": "string",
  • "stack": "string",
  • "code": "string",
  • "body": { },
  • "validation": [
    ]
}

Delete file

Archives a file.

Authorizations:
jwt
path Parameters
id
required
string

Id of the file to download

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "message": "string",
  • "stack": "string",
  • "code": "string",
  • "body": { },
  • "validation": [
    ]
}

Request file information

Request file information without downloading it

Authorizations:
jwt
path Parameters
id
required
string

Id of the file to download

Responses

Response samples

Content type
application/json
{
  • "bucket": "string",
  • "type": "sample",
  • "organisationId": "string",
  • "name": "string",
  • "path": "string",
  • "hash": "string",
  • "contentType": "string",
  • "url": "string",
  • "urlStream": "string",
  • "userId": "string",
  • "userName": "string",
  • "organisations": [
    ],
  • "createdAtUTC": "string"
}

initialise

Retrieve system settings

Initial API to get required data for the client

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "commodities": [
    ],
  • "sellerCommodities": [
    ],
  • "trading": {
    },
  • "conversions": {
    },
  • "countries": {
    },
  • "regions": [
    ],
  • "regionGroups": [
    ]
}

Retrieve system settings

Initial API to get required data for the client

Authorizations:
jwt
path Parameters
country
required
string

Users country

Responses

Response samples

Content type
application/json
{
  • "commodities": [
    ],
  • "sellerCommodities": [
    ],
  • "trading": {
    },
  • "conversions": {
    },
  • "countries": {
    },
  • "regions": [
    ],
  • "regionGroups": [
    ]
}

Cache

Get cache keys

Endpoint to get cache item

Authorizations:
jwt
query Parameters
key
required
string

Cache key

engine
string

Cache Engine

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Create cache

Endpoint to clear all or part of the cache

Authorizations:
jwt
Request Body schema: application/json
keys
Array of strings
prefixes
Array of strings
flush
boolean or null
Default: false
secrets
boolean or null
Default: false

Responses

Request samples

Content type
application/json
{
  • "keys": [
    ],
  • "prefixes": [
    ],
  • "flush": false,
  • "secrets": false
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Get cache keys

Endpoint to get cache keys

Authorizations:
jwt
query Parameters
prefix
required
string

Cache keys prefix

engine
string

Cache Engine

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

geo

Get supported countries

Returns a list of supported countries

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Get Location by What 3 Words

Get Location by What 3 Words

query Parameters
query
string

Free text search field for querying

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Get Location by Address Id

Get Location by Address Id

query Parameters
id
required
string

Id of the address to get details for

source
string

Source of the address search result

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Search addresses

Search for addresses and address containers

query Parameters
query
string

Free text search field for querying

id
string
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "text": "string",
  • "description": "string",
  • "source": "loqate"
}

Get Location by Coordinates

Get Location by Coordinates

query Parameters
lat
required
number

Latitude

lon
required
number

Longitude

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Get supported countries

Returns a list of supported countries

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Get Location by What 3 Words

Get Location by What 3 Words

query Parameters
query
string

Free text search field for querying

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Get Location by Address Id

Get Location by Address Id

query Parameters
id
required
string

Id of the address to get details for

source
string

Source of the address search result

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Search addresses

Search for addresses and address containers

query Parameters
query
string

Free text search field for querying

id
string
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "text": "string",
  • "description": "string",
  • "source": "loqate"
}

Get Location by Coordinates

Get Location by Coordinates

query Parameters
lat
required
number

Latitude

lon
required
number

Longitude

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

countries

Get supported countries

Returns a list of supported countries

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Get supported countries

Returns a list of supported countries

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

what3words

Get Location by What 3 Words

Get Location by What 3 Words

query Parameters
query
string

Free text search field for querying

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Get Location by What 3 Words

Get Location by What 3 Words

query Parameters
query
string

Free text search field for querying

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

address

Get Location by Address Id

Get Location by Address Id

query Parameters
id
required
string

Id of the address to get details for

source
string

Source of the address search result

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Search addresses

Search for addresses and address containers

query Parameters
query
string

Free text search field for querying

id
string
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "text": "string",
  • "description": "string",
  • "source": "loqate"
}

Get Location by Address Id

Get Location by Address Id

query Parameters
id
required
string

Id of the address to get details for

source
string

Source of the address search result

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Search addresses

Search for addresses and address containers

query Parameters
query
string

Free text search field for querying

id
string
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "text": "string",
  • "description": "string",
  • "source": "loqate"
}

coordinates

Get Location by Coordinates

Get Location by Coordinates

query Parameters
lat
required
number

Latitude

lon
required
number

Longitude

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Get Location by Coordinates

Get Location by Coordinates

query Parameters
lat
required
number

Latitude

lon
required
number

Longitude

Responses

Response samples

Content type
application/json
{
  • "what3words": "string",
  • "address": {
    },
  • "coordinates": {
    }
}

Country Regions

Get Country Regions

Returns a list regions based on the users country

query Parameters
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "regions": [
    ]
}

Get Country Regions

Returns a list regions based on the users country

query Parameters
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "regions": [
    ]
}

Hurl

Redirect the incoming URL

Redirect the incoming URL

path Parameters
id
required
string

Id of the resource

Responses

Create a short Hurl URL

Create a short Hurl URL

Request Body schema: application/json
template
required
string
source
string or null
campaign
string or null
url
required
string

Responses

Request samples

Content type
application/json
{
  • "template": "string",
  • "source": "string",
  • "campaign": "string",
  • "url": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

DevOps

Get current versions of the service client libraries

Request Body schema: application/json
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

System

Restore e2e database for new test run

Authorizations:
jwt
query Parameters
env
required
string

Environment

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Delete e2e database

Authorizations:
jwt
path Parameters
id
required
string

Database Id

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Import and overwrite commodity varieties

Authorizations:
jwt
Request Body schema: multipart/form-data
organisationId
string or null
organisationName
string or null
file
required
Array of strings <binary>

Responses

Response samples

Content type
application/json
{
  • "success": 0,
  • "validation": 0,
  • "errors": 0,
  • "results": [
    ]
}

Import and overwrite commodity varieties

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Export commodity specifications

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

ask-an-expert

Ask an ag expert

Ask an agricultural expert for advice on a farming related topic

Authorizations:
jwt
Request Body schema: application/json
question
required
string <= 1000
required
Array of objects or null

Responses

Request samples

Content type
application/json
{
  • "question": "string",
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Ask an ag expert about the quality of a grain sample

Ask an agricultural expert for an analysis of a grain sample

Authorizations:
jwt
Request Body schema: application/json
required
Array of objects or null
Array
name
string
id
required
string
url
string or null
userId
string or null
userName
string or null
organisationId
string or null
createdAtUTC
string or null

Responses

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Commodities

Retrieve commodities

Retrieve commodities

query Parameters
countryISO
string

Filter by country

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve commodity specifications

Retrieve commodity specifications

Authorizations:
jwt
path Parameters
commodityType
string

Filter by commodity type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve commodity default specifications

Retrieve commodity default specifications

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

query Parameters
commodityGrade
string

Filter records by commodity grade

commodityType
string

Filter by commodity type

Responses

Response samples

Content type
application/json
{
  • "commodity": {
    },
  • "measures": [
    ]
}

Conversations

Create a new conversation based on this message

Authorizations:
jwt
Request Body schema: application/json
to
required
string
message
required
string
listingId
string or null
listingType
string or null
Enum: "livestock" "crop"
conversationId
string or null
title
string or null

Responses

Request samples

Content type
application/json
{
  • "to": "string",
  • "message": "string",
  • "listingId": "string",
  • "listingType": "livestock",
  • "conversationId": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "listingId": "string",
  • "listingType": "livestock",
  • "conversationId": "string",
  • "createdAtUTC": "string",
  • "title": "string"
}

Retrieve all conversations for a user

Authorizations:
jwt
query Parameters
limit
integer

Limit page size of results

offset
integer

Number of results to skip for the current page

sortBy
string

Sort results by this field

sortDesc
boolean

Sort results descending if true, otherwise ascending

Responses

Response samples

Content type
application/json
{
  • "docs": [
    ],
  • "totalDocs": 0,
  • "limit": 0,
  • "offset": 0
}

Retrieve a single conversation

Authorizations:
jwt
path Parameters
id
required
string

Conversation ID

Responses

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "listingId": "string",
  • "listingType": "livestock",
  • "conversationId": "string",
  • "createdAtUTC": "string",
  • "title": "string"
}

Add a new message to the conversation

Authorizations:
jwt
path Parameters
id
required
string

Conversation ID

Request Body schema: application/json
to
required
string
message
required
string
listingId
string or null
listingType
string or null
Enum: "livestock" "crop"
conversationId
string or null
title
string or null

Responses

Request samples

Content type
application/json
{
  • "to": "string",
  • "message": "string",
  • "listingId": "string",
  • "listingType": "livestock",
  • "conversationId": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "listingId": "string",
  • "listingType": "livestock",
  • "conversationId": "string",
  • "createdAtUTC": "string",
  • "title": "string"
}

Retrieve a conversation for a listing

Authorizations:
jwt
path Parameters
action
required
string

Listing ID

Responses

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "listingId": "string",
  • "listingType": "livestock",
  • "conversationId": "string",
  • "createdAtUTC": "string",
  • "title": "string"
}

System System

Ping api

Ping system api

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Execute event

Execute event in system module

Authorizations:
jwt
path Parameters
action
required
string

Action to perform

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Update system settings

Change the system settings document in the system module

Authorizations:
jwt
Request Body schema: application/json
required
object
level
required
string
filter
required
string or null

Responses

Request samples

Content type
application/json
{
  • "logging": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}

Trigger

Authorizations:
jwt

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "string"
}