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

history

Type: Preset_history

id

Type: string

ID of the preset in the reference book.

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

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

PresetType

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

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.