Skip to main content
POST
Create sales

Авторизации

Authorization
string
header
обязательно

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

Заголовки

X-Tenant-Id
integer

Компания, в контексте которой выполняется запрос — её id из GET /v1/tenant/. Пользователь должен состоять в этой компании: чужой id доступа к данным не даёт. Без заголовка компания определяется по домену запроса.

Тело

client
integer | null
agent
integer | null
discount
integer | null
additional_discount
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
created_by
integer

Ответ

201 - application/json
id
integer
обязательно
read-only
discount_amount
string<decimal>
обязательно
read-only
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
price
string<decimal>
обязательно
read-only
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
price_discount
string<decimal>
обязательно
read-only
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
paid_amount
string<decimal>
обязательно
read-only
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
rental_point
integer | null
обязательно
read-only
status
enum<integer>
обязательно
  • 0 - черновик
  • 1 - Продано
  • 2 - Отменено
Доступные опции:
0,
1,
2
client
integer | null
agent
integer | null
discount
integer | null
additional_discount
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
created_by
integer