Перейти к основному содержанию
POST
/
v1
/
crm
/
maintenances
cURL
curl --request POST \
  --url https://api.example.com/v1/crm/maintenances/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "inventory": 123,
  "type": 0,
  "responsible": 123,
  "description": "<string>",
  "state": 123,
  "interval": "<string>",
  "period_type": 0,
  "maintenance_date": "2023-11-07T05:31:56Z",
  "distance_threshold": -1,
  "time_threshold": "<string>",
  "total_distance": 0,
  "distance": 0
}
'
{
  "id": 123,
  "name": "<string>",
  "inventory": 123,
  "type": 0,
  "responsible": 123,
  "comment": "<string>",
  "fact_maintenance_date": "2023-11-07T05:31:56Z",
  "end_total_distance": 123,
  "description": "<string>",
  "state": 123,
  "interval": "<string>",
  "period_type": 0,
  "maintenance_date": "2023-11-07T05:31:56Z",
  "distance_threshold": -1,
  "time_threshold": "<string>",
  "total_distance": 0,
  "distance": 0
}

Тело

name
string
обязательно
Maximum string length: 255
inventory
integer
обязательно
type
enum<integer>
обязательно
  • 0 - one time
  • 1 - periodic
Доступные опции:
0,
1
Требуемый диапазон: -32768 <= x <= 32767
responsible
integer
обязательно
description
string | null
state
integer | null
interval
string | null
period_type
  • 0 - interval
  • 1 - distance
Доступные опции:
0,
1
Требуемый диапазон: -32768 <= x <= 32767
maintenance_date
string<date-time> | null
distance_threshold
integer | null
Требуемый диапазон: -2147483648 <= x <= 2147483647
time_threshold
string | null
total_distance
integer<int64> | null
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000
distance
integer<int64> | null
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000

Ответ

201 - application/json
id
integer
обязательно
name
string
обязательно
Maximum string length: 255
inventory
integer
обязательно
type
enum<integer>
обязательно
  • 0 - one time
  • 1 - periodic
Доступные опции:
0,
1
Требуемый диапазон: -32768 <= x <= 32767
responsible
integer
обязательно
comment
string | null
обязательно
fact_maintenance_date
string<date-time> | null
обязательно
end_total_distance
integer | null
обязательно
description
string | null
state
integer | null
interval
string | null
period_type
  • 0 - interval
  • 1 - distance
Доступные опции:
0,
1
Требуемый диапазон: -32768 <= x <= 32767
maintenance_date
string<date-time> | null
distance_threshold
integer | null
Требуемый диапазон: -2147483648 <= x <= 2147483647
time_threshold
string | null
total_distance
integer<int64> | null
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000
distance
integer<int64> | null
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000