Gets the preset of the company by ID
Gets information about the preset and the preset body.
Request
GET
https://courier.yandex.ru/api/v1/reference-book/companies/{company_id}/presets/{preset_id}
Path parameters
Name |
Description |
company_id* |
Type: integer The ID of the company whose presets you need to get. |
preset_id* |
Type: string ID of the preset in the reference book. |
Responses
200 OK
Preset has been successfully returned.
Body
application/json
{
"number": "string",
"description": "string",
"id": "string",
"type": "depot",
"history": {
"created_at": "string",
"updated_at": "string",
"updated_by": "string"
},
"body": {}
}
Name |
Description |
body |
Type: object The preset body is in the form of JSON, the schema must match the preset type. |
description |
Type: string Description of the preset. Max length: |
history |
Type: Preset_history |
id |
Type: string ID of the preset in the reference book. |
number |
Type: string Preset number. Cannot start with Max length: |
type |
Type: PresetType The type of preset. Enum: |
Preset_history
Name |
Description |
created_at |
Type: string The preset creation time in the format YYYY-MM-DDThh:mm:ssZ. |
updated_at |
Type: string Preset update time in the format YYYY-MM-DDThh:mm:ssZ. |
updated_by |
Type: string Who made the last changes. |
PresetType
The type of preset.
Type |
Description |
Enum: |
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. The preset is associated with some other company.
500 Internal Server Error
Server error during request processing.
No longer supported, please use an alternative and newer version.