Gets public presets

Gets an array of elements containing information about the preset and the preset body.

Request

GET

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

Query parameters

Name

Description

max_results

Type: integer

The maximum number of entities that should be returned.

number

Type: string

Number of the requested preset.

order_by

Type: string

A field for sorting presets.

Enum: type, number, updated_at

page_token

Type: string

A token for page-by-page receipt of the result. It can either be missing or equal to next_page_token from the body of the previous response. When using the page_token parameter, the rest of the request parameters will be ignored.

types

Type: string<list_of_preset_types>

List of the type of presets requested. Available types — depot, location, options, vehicle, vehicle-shift.

Responses

200 OK

Presets have been successfully returned.

Body

application/json
{
    "next_page_token": "string",
    "results": [
        {
            "number": "string",
            "description": "string",
            "id": "string",
            "type": "depot",
            "history": {
                "created_at": "string",
                "updated_at": "string",
                "updated_by": "string"
            },
            "body": {}
        }
    ]
}

Name

Description

results*

Type: PresetsList[]

next_page_token

Type: string

If present, then there is a next page, and this url can be called with page_token equal to this field, to get the next page.

PresetsList

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

400 Bad Request

Invalid parameters were passed.

401 Unauthorized

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

500 Internal Server Error

Server error during request processing.