Livestock API (1.0.0)
Download OpenAPI specification:Download
Search SML listings
Search SML listings
Authorizations:
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 |
f:status | string Enum: "active-selling" "active-buying" "sold" "found" SML listing status |
f:commodityType | string SML listing category type |
f:commodityBreed | Array of strings SML listing category breed |
f:commodityBreedSociety | Array of strings SML listing category breed society |
f:commoditySexes | string Enum: "ewes" "rams" "lambs" "shearlings" "heifers" "steers" "bulls" "cows" SML listing category sexes |
f:commodityAdditionalInfo | string Enum: "crossbred" "in-lamb" "pedigree" "organic" "in-calf" "named-sire" SML listing category additional info |
latitude | number |
longitude | number |
distanceKm | number |
isWishlisted | boolean SML listings that have been wishlisted by the user |
minAge | number SML listings where commodity age is greater or equal to |
maxAge | number SML listings where commodity age is less than or equal to |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
[- {
- "id": "string",
- "userId": "string",
- "organisationId": "string",
- "organisationName": "string",
- "type": "selling",
- "status": "active",
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
], - "properties": { }
}
]
Get SML listing
Gets an SML listing
Authorizations:
path Parameters
id required | string Id of the resource |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "id": "string",
- "userId": "string",
- "organisationId": "string",
- "organisationName": "string",
- "type": "selling",
- "status": "active",
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
], - "properties": { }
}
Create sheep listing
Create a new sheep listing
Authorizations:
Request Body schema: application/json
type required | string Enum: "selling" "buying" |
isDraft required | boolean |
categoryIds required | Array of numbers |
required | object or null |
required | object |
required | Array of objects or null |
description required | string |
tags required | Array of strings |
required | object |
Responses
Request samples
- Payload
{- "type": "selling",
- "isDraft": true,
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
], - "properties": {
- "breedType": "cross",
- "type": [
- "store"
], - "additionalInfo": [
- "crossbred"
], - "sexes": "ewes",
- "health": {
- "data": "string"
}
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Create cattle listing
Create a new cattle listing
Authorizations:
Request Body schema: application/json
type required | string Enum: "selling" "buying" |
isDraft required | boolean |
categoryIds required | Array of numbers |
required | object or null |
required | object |
required | Array of objects or null |
description required | string |
tags required | Array of strings |
required | object |
Responses
Request samples
- Payload
{- "type": "selling",
- "isDraft": true,
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
], - "properties": {
- "type": "calves",
- "breedType": "cross",
- "additionalInfo": [
- "crossbred"
], - "sexes": "heifers",
- "quantity": 1,
- "societyNumber": "string",
- "minAge": 1,
- "maxAge": 1,
- "health": {
- "tbStatus": "restricted",
- "tbDetails": "string",
- "tbInterval": "unspecified",
- "data": "string"
}, - "performance": {
- "averageWeight": {
- "name": "string",
- "conversion": 0,
- "weight": 0
}, - "dailyLiveWeightGain": {
- "name": "string",
- "conversion": 0,
- "weight": 0
}
}
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Create working dog listing
Create a new working dog listing
Authorizations:
Request Body schema: application/json
type required | string Enum: "selling" "buying" |
isDraft required | boolean |
categoryIds required | Array of numbers |
required | object or null |
required | object |
required | Array of objects or null |
description required | string |
tags required | Array of strings |
required | object |
Responses
Request samples
- Payload
{- "type": "selling",
- "isDraft": true,
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
], - "properties": {
- "breedType": "cross",
- "sex": "male",
- "registration": {
- "dateOfBirth": "string",
- "isRegistered": true,
- "registrationNumber": "string",
- "name": "string"
}
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Create feed listing
Create a new feed listing
Authorizations:
Request Body schema: application/json
type required | string Enum: "selling" "buying" |
isDraft required | boolean |
categoryIds required | Array of numbers |
required | object or null |
required | object |
required | Array of objects or null |
description required | string |
tags required | Array of strings |
Responses
Request samples
- Payload
{- "type": "selling",
- "isDraft": true,
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Create bedding listing
Create a new bedding listing
Authorizations:
Request Body schema: application/json
type required | string Enum: "selling" "buying" |
isDraft required | boolean |
categoryIds required | Array of numbers |
required | object or null |
required | object |
required | Array of objects or null |
description required | string |
tags required | Array of strings |
Responses
Request samples
- Payload
{- "type": "selling",
- "isDraft": true,
- "categoryIds": [
- 0
], - "location": {
- "what3words": "string",
- "address": {
- "name": "string",
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "regionISO": "string",
- "postcode": "string",
- "countryName": "string",
- "countryISO": "GB"
}, - "coordinates": {
- "lat": 0,
- "lon": 0
}
}, - "price": {
- "type": "fixed",
- "pricePerUnit": {
- "amount": 0,
- "currency": "string"
}, - "minPrice": {
- "amount": 0,
- "currency": "string"
}, - "maxPrice": {
- "amount": 0,
- "currency": "string"
}
}, - "files": [
- {
- "name": "string",
- "id": "string",
- "url": "string",
- "userId": "string",
- "userName": "string",
- "organisationId": "string",
- "createdAtUTC": "string"
}
], - "description": "string",
- "tags": [
- "string"
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Close a listing
Closes an SML listing
Authorizations:
path Parameters
id required | string Id of the resource |
Request Body schema: application/json
status required | string Enum: "sold" "found" "cancelled" |
Responses
Request samples
- Payload
{- "status": "sold"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Report a listing
Report an SML listing
Authorizations:
path Parameters
id required | string Id of the resource |
Request Body schema: application/json
reason required | string Enum: "misleading" "suspicious" "other" |
message required | string or null |
Responses
Request samples
- Payload
{- "reason": "misleading",
- "message": "string"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}
Update system settings
Change the system settings document in the livestock module
Authorizations:
Request Body schema: application/json
required | object | ||||
|
Responses
Request samples
- Payload
{- "logging": {
- "level": "string",
- "filter": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "message": "string",
- "status": "string"
}