Business Deliveries
Return all deliveries for specific business.
Parameters
idpath integerRequired
Returns all deliveries by the specific business
id
. You can retrieve thisid
from ...includequery string
Include associations (delimited with comma). Available associations: business.
pagequery integer
Page offset to fetch.
per_pagequery integer
Number of results to return per page.
{
const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}/deliveries`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"url": "/api/v1/businesses/{id}/deliveries",
"method": "GET",
"data": [
{
"id": "2b96692f-4e1e-49d7-80b5-658611b908d2",
"type": "deliveries",
"links": {
"self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2"
},
"attributes": {
"code": "CH-1005",
"currency": "EUR",
"free-from-cents": 3500,
"price-cents": 600
},
"relationships": {
"business": {
"links": {
"self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/relationships/business",
"related": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/business"
}
}
}
},
],
"meta": {
"total-count": 4,
"total-pages": 1
}
}
Business Deliveries By Code
Return a delivery for specific business.
Parameters
idpath integerRequired
Return a delivery by the specific business
id
. You can retrieve thisid
from ...codepath integer
Provided a delivery
code
.includequery string
Include associations (delimited with comma). Available associations: business.
{
const res = await fetch(`${BASE_URL}/api/v1/businesses/${id}/deliveries/{code}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"data": {
"id": "2b96692f-4e1e-49d7-80b5-658611b908d2",
"type": "deliveries",
"links": {
"self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2"
},
"attributes": {
"code": "CH-1005",
"currency": "EUR",
"free-from-cents": 3500,
"price-cents": 600
},
"relationships": {
"business": {
"links": {
"self": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/relationships/business",
"related": "/deliveries/2b96692f-4e1e-49d7-80b5-658611b908d2/business"
}
}
}
}
}