Gets public preset

Gets public preset by ID.

Request

GET

https://courier.yandex.ru/api/v1/reference-book/public/presets/{preset_id}

Path parameters

Name

Description

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

Deprecated

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

422 Unprocessable Entity

Deprecated

Incorrect input. Preset doesn't exist.

500 Internal Server Error

Deprecated

Server error during request processing.