Skip to main content

Trading API (1.0.0)

Download OpenAPI specification:Download

contracts

Create a contract

Create a contract

Authorizations:
jwt
Request Body schema: application/json
buyerOrganisationId
required
string
buyerOrganisationName
string
businessUnitIds
Array of strings
required
object
required
object

Responses

Request samples

Content type
application/json
{
  • "buyerOrganisationId": "string",
  • "buyerOrganisationName": "string",
  • "businessUnitIds": [
    ],
  • "details": {
    },
  • "inventory": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "businessUnits": [
    ],
  • "details": {
    },
  • "inventory": {
    },
  • "buyer": {
    }
}

Search contracts

Search contracts

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

docs
boolean

Defaults to true, but if included and set to false, only fitlers will be returned for the search, no documents

format
string

Format for the endpoint response, supports JSON (default) or CSV

status
string

Filter by status

query
string

Free text search field for querying

f:commodity
string

Filter by commodity

f:commodityGrade
string

Filter records by commodity grade

f:commodityType
string

Filter by commodity type

f:commodityVariety
string

Filter records by commodity variety

f:harvestYear
string

Filter by harvest year

f:businessUnitIds
string

Filter by business units

f:tags
string

Filter by tags

Responses

Response samples

Content type
application/json
{
  • "docs": {
    },
  • "custom": {
    },
  • "totalDocs": 0,
  • "limit": 0,
  • "offset": 0,
  • "clearUrl": "string",
  • "activeFilters": [
    ],
  • "facets": [
    ],
  • "aggregations": [
    ]
}

Update a contract

Update a contract

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Request Body schema: application/json
businessUnitIds
Array of strings
required
object

Responses

Request samples

Content type
application/json
{
  • "businessUnitIds": [
    ],
  • "details": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "businessUnits": [
    ],
  • "details": {
    },
  • "inventory": {
    },
  • "buyer": {
    }
}

Delete a contract

Delete a contract

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

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

Create or update a contract file

Create or update a contract file

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Request Body schema: application/json
required
object or null
name
string
id
required
string
url
string or null

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "businessUnits": [
    ],
  • "details": {
    },
  • "inventory": {
    },
  • "buyer": {
    }
}

Delete a contract file

Delete a contract file

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

fileId
required
string

File ID

Responses

Response samples

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

contract

Get Contract Details

Get Contract Details

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "businessUnits": [
    ],
  • "details": {
    },
  • "inventory": {
    },
  • "buyer": {
    }
}

listings

Create a listing

Create a listing

Authorizations:
jwt
Request Body schema: application/json
businessUnitId
required
string or null
required
object
required
object
Array of objects or null
Array of objects or null
tags
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "businessUnitId": "string",
  • "details": {
    },
  • "inventory": {
    },
  • "marketBuyers": [
    ],
  • "bidAlerts": [
    ],
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "substatus": "unsold",
  • "business": {
    },
  • "details": {
    },
  • "inventory": {
    },
  • "activeBids": 0
}

Search listings

Search listings

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

docs
boolean

Defaults to true, but if included and set to false, only fitlers will be returned for the search, no documents

format
string

Format for the endpoint response, supports JSON (default) or CSV

status
string

Filter by status

f:commodity
string

Filter by commodity

f:commodityGrade
string

Filter records by commodity grade

f:commodityType
string

Filter by commodity type

f:commodityVariety
string

Filter records by commodity variety

f:harvestYear
string

Filter by harvest year

f:businessUnitIds
string

Filter by business units

f:tags
string

Filter by tags

Responses

Response samples

Content type
application/json
{
  • "docs": {
    },
  • "custom": { },
  • "totalDocs": 0,
  • "limit": 0,
  • "offset": 0,
  • "clearUrl": "string",
  • "activeFilters": [
    ],
  • "facets": [
    ],
  • "aggregations": [
    ]
}

Close a listing

Close a listing

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "substatus": "unsold",
  • "business": {
    },
  • "details": {
    },
  • "inventory": {
    },
  • "activeBids": 0
}

listing

Get Listing Details

Get Listing Details

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "active",
  • "substatus": "unsold",
  • "business": {
    },
  • "details": {
    },
  • "inventory": {
    },
  • "activeBids": 0
}

bids

Create a bid

Create a bid

Authorizations:
jwt
Request Body schema: application/json
listingId
required
string
expiresAtUTC
required
string
required
Array of objects
required
object
reference
string or null
Array of objects or null

Responses

Request samples

Content type
application/json
{
  • "listingId": "string",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "reference": "string",
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "listingId": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "createdAtUTC": "string",
  • "status": "active",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "contract": {
    }
}

Search bids

Search bids

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

docs
boolean

Defaults to true, but if included and set to false, only fitlers will be returned for the search, no documents

format
string

Format for the endpoint response, supports JSON (default) or CSV

status
string

Filter by status

listingId
string

Filter by listing

Responses

Response samples

Content type
application/json
{
  • "docs": {
    },
  • "custom": { },
  • "totalDocs": 0,
  • "limit": 0,
  • "offset": 0,
  • "clearUrl": "string",
  • "activeFilters": [
    ],
  • "facets": [
    ],
  • "aggregations": [
    ]
}

Get Bid Details

Get Bid Details

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "listingId": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "createdAtUTC": "string",
  • "status": "active",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "contract": {
    }
}

Update a bid

Withdraws a bid, updates and returns a new bid

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Request Body schema: application/json
expiresAtUTC
required
string
required
Array of objects
required
object

Responses

Request samples

Content type
application/json
{
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "listingId": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "createdAtUTC": "string",
  • "status": "active",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "contract": {
    }
}

Accepts a bid

Accepts a bid

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Request Body schema: application/json
optionId
required
number
weight
required
number

Responses

Request samples

Content type
application/json
{
  • "optionId": 0,
  • "weight": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "listingId": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "createdAtUTC": "string",
  • "status": "active",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "contract": {
    }
}

Withdraws a bid

Withdraws a bid

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "listingId": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "createdAtUTC": "string",
  • "status": "active",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "contract": {
    }
}

Adds a contract to the bid

Adds a contract to the bid

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Request Body schema: application/json
reference
required
string
required
Array of objects or null

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": "string",
  • "listingId": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "createdAtUTC": "string",
  • "status": "active",
  • "expiresAtUTC": "string",
  • "options": [
    ],
  • "terms": {
    },
  • "contract": {
    }
}

Trading service

Ping api

Ping trading api

Responses

Response samples

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

Execute event

Execute event in trading 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 trading 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"
}