Skip to main content
POST
Create inventories

Авторизации

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 доступа к данным не даёт. Без заголовка компания определяется по домену запроса.

Тело

name
string
обязательно
Maximum string length: 255
car
object | null
category
integer | null
rental_point
integer | null
unique_id
string | null
Maximum string length: 255
type
enum<integer>
  • 0 - Аренда
  • 1 - Продажа
Доступные опции:
0,
1
Требуемый диапазон: 0 <= x <= 32767
buy_price
string<decimal> | null
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
buy_date
string<date> | null
sell_price
string<decimal> | null
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
sell_date
string<date-time> | null
lifetime
integer | null
Требуемый диапазон: -2147483648 <= x <= 2147483647
stock_price
string<decimal> | null
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
comment
string | null
Maximum string length: 1024
image
string<uri> | null
prev_earning
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
extra
any
tenant
integer
group
integer | null
state
integer | null

Ответ

201 - application/json
id
integer
обязательно
read-only
subleases
object[]
обязательно
read-only
deleted
boolean
обязательно
read-only
created_at
string<date-time>
обязательно
read-only
updated_at
string<date-time>
обязательно
read-only
name
string
обязательно
Maximum string length: 255
device_unique_id
string | null
обязательно
read-only
car
object | null
category
integer | null
rental_point
integer | null
unique_id
string | null
Maximum string length: 255
type
enum<integer>
  • 0 - Аренда
  • 1 - Продажа
Доступные опции:
0,
1
Требуемый диапазон: 0 <= x <= 32767
buy_price
string<decimal> | null
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
buy_date
string<date> | null
sell_price
string<decimal> | null
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
sell_date
string<date-time> | null
lifetime
integer | null
Требуемый диапазон: -2147483648 <= x <= 2147483647
stock_price
string<decimal> | null
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
comment
string | null
Maximum string length: 1024
image
string<uri> | null
prev_earning
string<decimal>
Pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
extra
any
tenant
integer
group
integer | null
state
integer | null