Gets public presets.
Gets an array of elements containing information about the preset and the preset body.
HTTP Request
GET https://courier.yandex.ru/api/v1/reference-book/public/presets\
?types={string}\
&number={string}\
&page_token={string}\
&max_results={integer}\
&order_by={string}
Query Parameters
types | string List of the type of presets requested. Available types - "depot", "location", "options", "vehicle", "vehicle-shift". |
number | string Number of the requested preset. |
page_token | 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. |
max_results | integer The maximum number of entities that should be returned. |
order_by | string A field for sorting presets. |
types | string List of the type of presets requested. Available types - "depot", "location", "options", "vehicle", "vehicle-shift". |
number | string Number of the requested preset. |
page_token | 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. |
max_results | integer The maximum number of entities that should be returned. |
order_by | string A field for sorting presets. |
* Required parameter
Responses
Code 200
Presets have been successfully returned.
{ "next_page_token": string, "results": [ { "body": {}, "description": string, "history": { "created_at": string, "updated_at": string, "updated_by": string }, "id": string, "number": string, "type": string } ] }
Copied to clipboard
Representation
Fields
next_page_token | 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. |
results[] * | array |
results[]. | object The preset body is in the form of json, the schema must match the preset type. |
results[]. | string Description of the preset. |
results[]. | object |
results[]. | string The preset creation time in the format YYYY-MM-DDThh:mm:ssZ. |
results[]. | string Preset update time in the format YYYY-MM-DDThh:mm:ssZ. |
results[]. | string Who made the last changes. |
results[]. | string ID of the preset in the reference book. |
results[]. | string Preset number. Cannot start with public_ and contain a comma character. |
results[]. | string The type of preset. Allowed values
|
next_page_token | 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. |
results[] * | array |
results[]. | object The preset body is in the form of json, the schema must match the preset type. |
results[]. | string Description of the preset. |
results[]. | object |
results[]. | string The preset creation time in the format YYYY-MM-DDThh:mm:ssZ. |
results[]. | string Preset update time in the format YYYY-MM-DDThh:mm:ssZ. |
results[]. | string Who made the last changes. |
results[]. | string ID of the preset in the reference book. |
results[]. | string Preset number. Cannot start with public_ and contain a comma character. |
results[]. | string The type of preset. Allowed values
|
* Required parameter
Code 400
Invalid parameters were passed.
Code 401
Authorization error. Make sure that the request header contains the correct OAuth token.
Code 500
Server error during request processing.