Businesses Privatisations
Return all privatisations for specific business.
Parameters
idpath integerRequired
Return all privatisations by the specific business
id
. You can retrieve thisid
from ...includequery string
Include associations (delimited with comma). Available associations: business, user
Example:
business,user
sortquery string
Sort ascending or descending order.
filter[start_date]query date
Filter by
start_date
date should be formated as a ISO date.filter[end_date]query date
Filter by
end_date
date should be formated as a ISO date.filter[statuses]query string
Filter by
statuses
.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}/privatisations`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"data": [
{
"id": "49d9ba83-782a-432a-b2af-3098f7a2b53e",
"type": "privatisations",
"links": {
"self": "/privatisations/49d9ba83-782a-432a-b2af-3098f7a2b53e"
},
"attributes": {
"user-name": "Abc",
"name": "Test",
"email": "aleksandra.bochenska@netguru.com",
"phone": "999999999",
"phone-country-prefix": "41",
"phone-country-code": "CH",
"corporate-event": true,
"date": "2022-08-20",
"number-of-servings": 3,
"company-name": null,
"price-cents": 0,
"from": 7200,
"to": 10800,
"number-of-waiters": 0,
"type-of-event": "Yes",
"chef-attendance": true,
"specifications": null,
"menu": {
"url": null
},
"offer-send-at": null,
"currency": null,
"status": "draft",
"created-at": "2022-08-19T13:07:35.041Z"
},
"relationships": {
"business": {
"links": {
"self": "/privatisations/49d9ba83-782a-432a-b2af-3098f7a2b53e/relationships/business",
"related": "/privatisations/49d9ba83-782a-432a-b2af-3098f7a2b53e/business"
}
},
"user": {
"links": {
"self": "/privatisations/49d9ba83-782a-432a-b2af-3098f7a2b53e/relationships/user",
"related": "/privatisations/49d9ba83-782a-432a-b2af-3098f7a2b53e/user"
}
}
}
},
],
"meta": {
"total-count": 2,
"total-pages": 1
}
}