Return all reservations for specific business
GEThttps://api.staging.powerapi.com/api/v1/businesses/:id/reservations
Return all reservations for specific business
Request
Path Parameters
id int32required
Query Parameters
include string
Include associations (delimited with comma). Available associations: bookings, tables, business, user
sort string
filter[start_date] date
filter[end_date] date
filter[from] int32
filter[to] int32
filter[states] string
page int32
Page offset to fetch.
Default value:
1
per_page int32
Number of results to return per page.
Default value:
10
Responses
- 200
Return all reservations for specific business
- application/vnd.api+json
- Schema
- Example (auto)
- Example
Schema
data object[]
meta object
{
"data": [
{
"id": "string",
"type": "reservations",
"links": {
"self": "string"
},
"attributes": {
"comment": "string",
"date": "string",
"email": "string",
"from": 0,
"marketing-agreement": true,
"name": "string",
"other-rejection-reason": "string",
"party-size": 0,
"phone": "string",
"phone-country-code": "string",
"phone-country-prefix": "string",
"reject-reason": "string",
"state": "string",
"status": "string",
"table": {
"id": 0,
"business_id": "string",
"floor_plan_id": "string",
"number": "string",
"number_of_seats": 0,
"uuid": "string",
"shape": "string",
"rotation": 0,
"position_x": 0,
"position_y": 0
},
"guest-id": "string",
"to": 0,
"created-at": "string"
},
"relationships": {
"bookings": {
"data": [
{
"type": "bookings",
"id": "string"
}
]
},
"tables": {
"links": {
"self": "string",
"related": "string"
}
},
"business": {
"links": {
"self": "string",
"related": "string"
}
},
"user": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"meta": {
"total-count": 0,
"total-pages": 0
}
}
{
"data": [
{
"id": "f3b21824-2e25-4bfc-b366-a7b96c48c4b4",
"type": "reservations",
"attributes": {
"comment": null,
"date": "2024-04-05T08:35:28.300Z",
"email": "jd@email.com",
"from": 68400,
"marketing-agreement": false,
"name": "John Doe",
"other-rejection-reason": null,
"party-size": 2,
"phone": "4321341231",
"phone-country-code": "US",
"phone-country-prefix": "1",
"reject-reason": null,
"state": "booked",
"status": "main_course",
"table": {
"id": 4983,
"business_id": null,
"number": "1",
"number_of_seats": 2,
"uuid": "d2b567bd-6e89-4a69-9ea4-f5f13fd22422",
"shape": "round",
"rotation": 0,
"position_x": 108,
"position_y": 118,
"floor_plan_id": "3e180f21-234b-4a87-b4aa-9f278e82b353"
},
"guest-id": "06285627-dce8-4d33-91a8-d66534990292",
"to": 70200,
"created-at": "2024-04-05T08:35:28.300Z"
}
}
],
"meta": {
"total-count": 22,
"total-pages": 3
}
}
Authorization: http
name: bearertype: httpscheme: bearerbearerFormat: JWT
- curl
- python
- go
- nodejs
- ruby
- java
- powershell
- CURL
curl -L 'https://api.staging.powerapi.com/api/v1/businesses/:id/reservations' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear