API Reference | Restaurant Booking
Restaurant Booking API (1.0.0)
Download OpenAPI specification:Download
Response samples
- 200
Content type
application/json
{
}Получить список ресторанов с фильтрацией
Authorizations:
BearerAuth
query Parameters
| search | string |
| type | string |
| cuisine | Array of strings |
| rating | number [ 0 .. 5 ] |
| priceMin | integer |
| priceMax | integer |
| kidsMenu | boolean |
| metro | string |
| district | string |
| page | integer Default: 1 |
| limit | integer Default: 10 |
Responses
Response samples
- 200
Content type
application/json
{- "items": [
- {
- "id": 0,
- "name": "string",
- "cuisine": [
- "string"
], - "averageCheck": 0,
- "rating": 0,
}
], - "total": 0,
- "page": 0,
- "limit": 0
}Получить детальную информацию о ресторане
Authorizations:
BearerAuth
path Parameters
| id required | integer |
Responses
Response samples
- 200
Content type
application/json
{- "id": 0,
- "name": "string",
- "rating": 0,
- "cuisine": [
- "string"
], - "averageCheck": 0,
- "address": {
- "city": "string",
- "street": "string",
- "building": "string"
}, - "workingHours": {
- "open": "string",
- "close": "string",
- "days": "string"
}, - "description": "string",
}Получить список столиков ресторана на выбранные дату/время
Authorizations:
BearerAuth
path Parameters
| id required | integer |
query Parameters
| date required | string <date> |
| time required | string |
| guests required | integer >= 1 |
Responses
Response samples
- 200
Content type
application/json
[- {
- "id": 0,
- "number": "string",
- "seats": 0,
- "isAvailable": true,
- "position": {
- "x": 0,
- "y": 0
}
}
]Создать новую бронь
Authorizations:
BearerAuth
Request Body schema: application/jsonrequired
| restaurantId required | integer |
| tableId required | integer |
| date required | string <date> |
| time required | string |
| guests required | integer >= 1 |
| comment | string |
Responses
Request samples
- Payload
Content type
application/json
{- "restaurantId": 0,
- "tableId": 0,
- "date": "2019-08-24",
- "time": "string",
- "guests": 1,
- "comment": "string"
}Response samples
- 201
Content type
application/json
{- "id": 0,
- "status": "pending",
- "restaurantName": "string",
- "tableNumber": "string",
- "date": "2019-08-24",
- "time": "string",
- "guests": 0
}Получить активные брони пользователя
Authorizations:
BearerAuth
query Parameters
| status | string Enum: "active" "archive" |
Responses
Response samples
- 200
Content type
application/json
[- {
- "id": 0,
- "restaurant": {
- "name": "string"
}, - "table": {
- "number": "string"
}, - "guests": 0,
- "date": "2019-08-24",
- "time": "string",
- "status": "pending"
}
]Response samples
- 200
Content type
application/json
{- "id": 0,
- "name": "string",
- "rating": 0,
- "cuisine": [
- "string"
], - "averageCheck": 0,
- "address": {
- "city": "string",
- "street": "string",
- "building": "string"
}, - "workingHours": {
- "open": "string",
- "close": "string",
- "days": "string"
}, - "description": "string",
- "contactPhone": "string",
- "contactEmail": "string",
- "internalNotes": "string",
- "settings": {
- "autoConfirmBookings": true
}
}Обновить профиль ресторана
Authorizations:
BearerAuth
Request Body schema: application/jsonrequired
| name | string |
| cuisine | Array of strings |
| averageCheck | integer |
object | |
object | |
| description | string |
| photos | Array of strings <uri> [ items <uri > ] |
| logo | string <uri> |
| contactPhone | string |
| contactEmail | string |
| internalNotes | string |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "cuisine": [
- "string"
], - "averageCheck": 0,
- "address": {
- "city": "string",
- "street": "string",
- "building": "string"
}, - "workingHours": {
- "open": "string",
- "close": "string",
- "days": "string"
}, - "description": "string",
- "contactPhone": "string",
- "contactEmail": "string",
- "internalNotes": "string",
- "settings": {
- "autoConfirmBookings": true
}
}Response samples
- 200
Content type
application/json
{- "id": 0,
- "name": "string",
- "rating": 0,
- "cuisine": [
- "string"
], - "averageCheck": 0,
- "address": {
- "city": "string",
- "street": "string",
- "building": "string"
}, - "workingHours": {
- "open": "string",
- "close": "string",
- "days": "string"
}, - "description": "string",
- "contactPhone": "string",
- "contactEmail": "string",
- "internalNotes": "string",
- "settings": {
- "autoConfirmBookings": true
}
}Получить список броней ресторана (админ)
Authorizations:
BearerAuth
query Parameters
| date | string <date> |
| time | string |
| tableId | integer |
| status | string Enum: "pending" "confirmed" "completed" "cancelled" |
| page | integer Default: 1 |
| limit | integer Default: 20 |
Responses
Response samples
- 200
Content type
application/json
{- "items": [
- {
- "id": 0,
- "restaurant": {
- "id": 0,
- "name": "string"
}, - "table": {
- "id": 0,
- "number": "string",
- "seats": 0
}, - "date": "2019-08-24",
- "time": "string",
- "guests": 0,
- "status": "pending",
- "comment": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "user": {
- "id": 0,
- "name": "string",
- "phone": "string"
}
}
], - "total": 0,
- "page": 0,
- "limit": 0
}Обновить схему зала
Authorizations:
BearerAuth
Request Body schema: application/jsonrequired
Array
| id | integer |
| number | string |
| seats | integer |
| isAvailable | boolean |
object | |
| isActive | boolean |
Responses
Request samples
- Payload
Content type
application/json
[- {
- "id": 0,
- "number": "string",
- "seats": 0,
- "isAvailable": true,
- "position": {
- "x": 0,
- "y": 0
}, - "isActive": true
}
]