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
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 Max length: |
type* |
Type: PresetType The type of preset. Enum: |
description |
Type: string Description of the preset. Max length: |
PresetType
The type of preset.
Type |
Description |
Enum: |
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.
No longer supported, please use an alternative and newer version.