Gets company presets.

  1. HTTP Request
  2. Path Parameters
  3. Query Parameters
  4. Responses
    1. Code 200
      1. Representation
      2. Fields
    2. Code 400
    3. Code 401
    4. Code 403
    5. Code 500

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/companies/{company_id}/presets\
?types={string}\
&number={string}\
&page_token={string}\
&max_results={integer}\
&order_by={string}

Path Parameters

company_id *

integer

The ID of the company whose presets you need to get.

company_id *

integer

The ID of the company whose presets you need to get.

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.

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

Collapse all
Expand all

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[].body

object

The preset body is in the form of json, the schema must match the preset type.

results[].description

string

Description of the preset.

results[].history

object

results[].history.created_at

string

The preset creation time in the format YYYY-MM-DDThh:mm:ssZ.

results[].history.updated_at

string

Preset update time in the format YYYY-MM-DDThh:mm:ssZ.

results[].history.updated_by

string

Who made the last changes.

results[].id

string

ID of the preset in the reference book.

results[].number

string

Preset number. Cannot start with public_ and contain a comma character.

results[].type

string

The type of preset.

Allowed values
  1. depot
  2. location
  3. options
  4. vehicle
  5. vehicle-shift

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[].body

object

The preset body is in the form of json, the schema must match the preset type.

results[].description

string

Description of the preset.

results[].history

object

results[].history.created_at

string

The preset creation time in the format YYYY-MM-DDThh:mm:ssZ.

results[].history.updated_at

string

Preset update time in the format YYYY-MM-DDThh:mm:ssZ.

results[].history.updated_by

string

Who made the last changes.

results[].id

string

ID of the preset in the reference book.

results[].number

string

Preset number. Cannot start with public_ and contain a comma character.

results[].type

string

The type of preset.

Allowed values
  1. depot
  2. location
  3. options
  4. vehicle
  5. vehicle-shift

Code 400

Invalid parameters were passed.

Code 401

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

Code 403

You do not have access to this object.

Code 500

Server error during request processing.