Adds presets to the company

Adds the passed presets of the company.

Request

POST

https://courier.yandex.ru/api/v1/reference-book/companies/{company_id}/presets

Path parameters

Name

Description

company_id*

Type: integer

The ID of the company whose presets you need to get.

Body

application/json
[
    {
        "number": "string",
        "description": "string",
        "type": "depot",
        "body": {}
    }
]

PresetsCreate[]

PresetsCreate

Name

Description

body*

Type: object

The preset body is in the form of JSON, the schema must match the preset type.

number*

Type: string

Preset number. Cannot start with public_ and contain a comma character.

Max length: 80

type*

Type: PresetType

The type of preset.

Enum: depot, location, options, vehicle, vehicle-shift

description

Type: string

Description of the preset.

Max length: 200

PresetType

The type of preset.

Type

Description

PresetType

Enum: depot, location, options, vehicle, vehicle-shift

Responses

200 OK

Presets have been successfully returned.

400 Bad Request

Invalid JSON in POST request body.

401 Unauthorized

Authorization error. Make sure that the request header contains the correct OAuth token.

403 Forbidden

You do not have access to this object.

422 Unprocessable Entity

Incorrect input. Preset already exists.

500 Internal Server Error

Server error during request processing.