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

Параметры пути

id
integer
обязательно

Тело

name
string
Maximum string length: 255
description
string | null
state
integer | null
interval
string | null
inventory
integer
type
enum<integer>
  • 0 - one time
  • 1 - periodic
Доступные опции:
0,
1
Требуемый диапазон: -32768 <= x <= 32767
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
responsible
integer
total_distance
integer<int64> | null
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000
distance
integer<int64> | null
Требуемый диапазон: -9223372036854776000 <= x <= 9223372036854776000

Ответ

200 - 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