Skip to main content

Sell My Livestock 2.0 API (1.0.0)

Download OpenAPI specification:Download

Sml

SML Commodities

Retrieve SML commodities

Retrieve SML commodities

query Parameters
commodityType
string

SML listing category type

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "type": "sheep",
  • "name": "string",
  • "subcategories": [
    ],
  • "tags": [
    ]
}

SML Breed Societies

Retrieve SML breed societies

Retrieve SML breed societies

Responses

Response samples

Content type
application/json
[
  • {
    }
]

SML Listings

Search SML listings

Search SML 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

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

Content type
application/json
[
  • {
    }
]

Get SML listing

Gets an SML listing

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "organisationId": "string",
  • "organisationName": "string",
  • "type": "selling",
  • "status": "active",
  • "categoryIds": [
    ],
  • "location": {
    },
  • "price": {
    },
  • "files": [
    ],
  • "description": "string",
  • "tags": [
    ],
  • "properties": { }
}

Create sheep listing

Create a new sheep listing

Authorizations:
jwt
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

Content type
application/json
{
  • "type": "selling",
  • "isDraft": true,
  • "categoryIds": [
    ],
  • "location": {
    },
  • "price": {
    },
  • "files": [
    ],
  • "description": "string",
  • "tags": [
    ],
  • "properties": {
    }
}

Response samples

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

Create cattle listing

Create a new cattle listing

Authorizations:
jwt
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

Content type
application/json
{
  • "type": "selling",
  • "isDraft": true,
  • "categoryIds": [
    ],
  • "location": {
    },
  • "price": {
    },
  • "files": [
    ],
  • "description": "string",
  • "tags": [
    ],
  • "properties": {
    }
}

Response samples

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

Create working dog listing

Create a new working dog listing

Authorizations:
jwt
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

Content type
application/json
{
  • "type": "selling",
  • "isDraft": true,
  • "categoryIds": [
    ],
  • "location": {
    },
  • "price": {
    },
  • "files": [
    ],
  • "description": "string",
  • "tags": [
    ],
  • "properties": {
    }
}

Response samples

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

Create feed listing

Create a new feed listing

Authorizations:
jwt
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

Content type
application/json
{
  • "type": "selling",
  • "isDraft": true,
  • "categoryIds": [
    ],
  • "location": {
    },
  • "price": {
    },
  • "files": [
    ],
  • "description": "string",
  • "tags": [
    ]
}

Response samples

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

Create bedding listing

Create a new bedding listing

Authorizations:
jwt
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

Content type
application/json
{
  • "type": "selling",
  • "isDraft": true,
  • "categoryIds": [
    ],
  • "location": {
    },
  • "price": {
    },
  • "files": [
    ],
  • "description": "string",
  • "tags": [
    ]
}

Response samples

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

Close a listing

Closes an SML listing

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Request Body schema: application/json
status
required
string
Enum: "sold" "found" "cancelled"

Responses

Request samples

Content type
application/json
{
  • "status": "sold"
}

Response samples

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

Report a listing

Report an SML listing

Authorizations:
jwt
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

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

Response samples

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

Add SML listing to wishlist

Add SML listing to wishlist

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

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

Remove SML listing from wishlist

Remove SML listing from wishlist

Authorizations:
jwt
path Parameters
id
required
string

Id of the resource

Responses

Response samples

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

Livestock System

Ping api

Ping livestock api

Responses

Response samples

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

Execute event

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