Skip to main content

API Reference | Restaurant Booking

Restaurant Booking API (1.0.0)

Download OpenAPI specification:Download

user

Методы для работы с профайлами пользователей

Получить данные для аватарки личного кабинета

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{}

restaurants

Методы для работы с ресторанами

Получить список ресторанов с фильтрацией

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

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "limit": 0
}

Получить детальную информацию о ресторане

Authorizations:
BearerAuth
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "rating": 0,
  • "cuisine": [
    ],
  • "averageCheck": 0,
  • "address": {
    },
  • "workingHours": {
    },
  • "description": "string",
  • "photos": []
}

Получить список столиков ресторана на выбранные дату/время

Authorizations:
BearerAuth
path Parameters
id
required
integer
query Parameters
date
required
string <date>
time
required
string
guests
required
integer >= 1

Responses

Response samples

Content type
application/json
[
  • {
    }
]

bookings

Бронирования

Создать новую бронь

Authorizations:
BearerAuth
Request Body schema: application/json
required
restaurantId
required
integer
tableId
required
integer
date
required
string <date>
time
required
string
guests
required
integer >= 1
comment
string

Responses

Request samples

Content type
application/json
{
  • "restaurantId": 0,
  • "tableId": 0,
  • "date": "2019-08-24",
  • "time": "string",
  • "guests": 1,
  • "comment": "string"
}

Response samples

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

Content type
application/json
[
  • {
    }
]

Отменить бронь

Authorizations:
BearerAuth
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "success": true
}

admin

Администрирование ресторана

Получить профиль ресторана для администратора

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "rating": 0,
  • "cuisine": [
    ],
  • "averageCheck": 0,
  • "address": {
    },
  • "workingHours": {
    },
  • "description": "string",
  • "photos": [],
  • "contactPhone": "string",
  • "contactEmail": "string",
  • "internalNotes": "string",
  • "settings": {
    }
}

Обновить профиль ресторана

Authorizations:
BearerAuth
Request Body schema: application/json
required
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

Content type
application/json
{
  • "name": "string",
  • "cuisine": [
    ],
  • "averageCheck": 0,
  • "address": {
    },
  • "workingHours": {
    },
  • "description": "string",
  • "photos": [],
  • "contactPhone": "string",
  • "contactEmail": "string",
  • "internalNotes": "string",
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "rating": 0,
  • "cuisine": [
    ],
  • "averageCheck": 0,
  • "address": {
    },
  • "workingHours": {
    },
  • "description": "string",
  • "photos": [],
  • "contactPhone": "string",
  • "contactEmail": "string",
  • "internalNotes": "string",
  • "settings": {
    }
}

Получить список броней ресторана (админ)

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

Content type
application/json
{
  • "items": [
    ],
  • "total": 0,
  • "page": 0,
  • "limit": 0
}

Получить все столики ресторана для редактирования

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Обновить схему зала

Authorizations:
BearerAuth
Request Body schema: application/json
required
Array
id
integer
number
string
seats
integer
isAvailable
boolean
object
isActive
boolean

Responses

Request samples

Content type
application/json
[
  • {
    }
]