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: |
page_token |
Type: string A token for page-by-page receipt of the result. It can either be missing or equal to |
types |
Type: string<list_of_preset_types> List of the type of presets requested. Available types — |
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 |
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: |
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: |
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.
No longer supported, please use an alternative and newer version.