Перейти к основному содержанию
POST
/
api
/
v1
/
external
/
restaurant
/
{id}
/
booking
Request a booking for a restaurant
curl --request POST \
  --url http://dev-backend-1.guestme.space/api/v1/external/restaurant/{id}/booking \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "firstName": "Mike",
  "lastName": "Kravec",
  "date": "2025-01-01T00:00:00Z",
  "phone": "+79994656464",
  "persons": 2,
  "comment": "<string>",
  "meta": {
    "promo": "<string>"
  }
}'
{
  "id": 1001,
  "persons": 2,
  "firstName": "Mike",
  "lastName": "Kravec",
  "phone": "+79994656464",
  "comment": "<string>",
  "state": "ACCEPTED",
  "date": "2025-01-01T00:00:00Z",
  "meta": {
    "promo": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Restaurant ID

Body

application/json
firstName
string
required

Guest first name

Minimum length: 1
Example:

"Mike"

date
string<date-time>
required

Booking ISO date

Example:

"2025-01-01T00:00:00Z"

phone
string
required

Guest valid phone number

Example:

"+79994656464"

persons
integer
required

Number of persons

Example:

2

lastName
string

Guest last name

Example:

"Kravec"

comment
string

Guest comment

meta
object

Booking meta

Response

200 - */*

OK

id
integer
required

Booking ID

Example:

1001

persons
integer
required

Number of persons

Example:

2

firstName
string
required

Guest first name

Example:

"Mike"

phone
string
required

Guest valid phone number

Example:

"+79994656464"

state
enum<string>
required

Booking state

Available options:
ACCEPTED,
DECLINED,
CANCELING,
CANCELED,
CREATED,
SENT,
CLOSED,
IN_PROGRESS,
PATCHING,
ERROR
Example:

"ACCEPTED"

date
string<date-time>
required

Booking ISO date

Example:

"2025-01-01T00:00:00Z"

lastName
string

Guest last name

Example:

"Kravec"

comment
string

Guest comment

meta
object

Booking meta

I