Данные для самостоятельного изготовления ярлыков

Метод доступен для моделей: FBS, Экспресс и DBS.

Пока недоступен для продавцов Market Yandex Go.

Если вы используете API-Key-токен, для вызова метода необходим один из доступов в списке

Возвращает информацию на ярлыках, которые клеятся на коробки в заказе.

⚙️ Лимит: 100 000 запросов в час

Request

GET

https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/orders/{orderId}/delivery/labels/data

Path parameters

Name

Description

campaignId

Type: integer

Идентификатор кампании (магазина) — технический идентификатор, который представляет ваш магазин в системе Яндекс Маркета при работе через API. Он однозначно связывается с вашим магазином, но предназначен только для автоматизированного взаимодействия.

Его можно узнать с помощью запроса GET v2/campaigns или найти в кабинете продавца на Маркете. Нажмите на иконку вашего аккаунта → Настройки и в меню слева выберите API и модули:

  • блок Идентификатор кампании;
  • вкладка Лог запросов → выпадающий список в блоке Показывать логи.

⚠️ Не путайте его с:

  • идентификатором магазина, который отображается в личном кабинете продавца;
  • рекламными кампаниями.

Min value: 1

orderId

Type: integer

Идентификатор заказа.

Responses

200 OK

Информация для печати ярлыков.

Body

application/json
{
  "status": "OK",
  "result": {
    "orderId": 0,
    "placesNumber": 0,
    "url": "example",
    "parcelBoxLabels": [
      {
        "url": null,
        "supplierName": "example",
        "deliveryServiceName": "example",
        "orderId": 0,
        "orderNum": "example",
        "recipientName": "example",
        "boxId": 0,
        "fulfilmentId": "example",
        "place": "example",
        "weight": "example",
        "deliveryServiceId": "example",
        "deliveryAddress": "example",
        "shipmentDate": "example"
      }
    ]
  }
}

Type: object

All of 2 types
  • Type: ApiResponse

    Стандартная обертка для ответов сервера.

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: OrderLabelDTO

    Данные для печати ярлыка.

    Example
    {
      "orderId": 0,
      "placesNumber": 0,
      "url": "example",
      "parcelBoxLabels": [
        {
          "url": null,
          "supplierName": "example",
          "deliveryServiceName": "example",
          "orderId": 0,
          "orderNum": "example",
          "recipientName": "example",
          "boxId": 0,
          "fulfilmentId": "example",
          "place": "example",
          "weight": "example",
          "deliveryServiceId": "example",
          "deliveryAddress": "example",
          "shipmentDate": "example"
        }
      ]
    }
    
    Example
    {
      "result": {
        "orderId": 0,
        "placesNumber": 0,
        "url": "example",
        "parcelBoxLabels": [
          {
            "url": null,
            "supplierName": "example",
            "deliveryServiceName": "example",
            "orderId": 0,
            "orderNum": "example",
            "recipientName": "example",
            "boxId": 0,
            "fulfilmentId": "example",
            "place": "example",
            "weight": "example",
            "deliveryServiceId": "example",
            "deliveryAddress": "example",
            "shipmentDate": "example"
          }
        ]
      }
    }
    

ApiResponseStatusType

Тип ответа. Возможные значения:

  • OK — ошибок нет.
  • ERROR — при обработке запроса произошла ошибка.

Type: string

Enum: OK, ERROR

ApiResponse

Стандартная обертка для ответов сервера.

Name

Description

status

Type: ApiResponseStatusType

Тип ответа. Возможные значения:

  • OK — ошибок нет.
  • ERROR — при обработке запроса произошла ошибка.

Enum: OK, ERROR

Example
{
  "status": "OK"
}

Url

Type: string

Min length: 1

Max length: 2000

Example: example

ParcelBoxLabelDTO

Информация о ярлыке для коробки.

Name

Description

boxId

Type: integer

Идентификатор коробки.

deliveryServiceId

Type: string

Идентификатор службы доставки. Информацию о службе доставки можно получить с помощью запроса GET delivery/services.

Example: example

deliveryServiceName

Type: string

Юридическое название службы доставки.

Example: example

fulfilmentId

Type: string

Идентификатор коробки в информационной системе магазина.

Возвращается в формате: номер заказа на Маркете-номер коробки. Например, 7206821‑1, 7206821‑2 и т. д.

Example: example

orderId

Type: integer

Идентификатор заказа в системе Маркета.

orderNum

Type: string

Идентификатор заказа в информационной системе магазина.

Совпадает с orderId, если Маркету неизвестен номер заказа в системе магазина.

Example: example

place

Type: string

Номер коробки в заказе. Возвращается в формате: номер места/общее количество мест.

Example: example

recipientName

Type: string

Фамилия и инициалы получателя заказа.

Example: example

supplierName

Type: string

Юридическое название магазина.

Example: example

url

Type: Url

Соответствует URL, по которому выполняется запрос GET v2/campaigns/{campaignId}/orders/{orderId}/delivery/shipments/{shipmentId}/boxes/{boxId}/label.

Min length: 1

Max length: 2000

Example: example

weight

Type: string

Общая масса всех товаров в заказе.

Возвращается в формате weight кг.

Example: example

deliveryAddress

Type: string

Адрес получателя.

Example: example

shipmentDate

Type: string

Дата отгрузки в формате dd.MM.yyyy.

Example: example

Example
{
  "url": "example",
  "supplierName": "example",
  "deliveryServiceName": "example",
  "orderId": 0,
  "orderNum": "example",
  "recipientName": "example",
  "boxId": 0,
  "fulfilmentId": "example",
  "place": "example",
  "weight": "example",
  "deliveryServiceId": "example",
  "deliveryAddress": "example",
  "shipmentDate": "example"
}

OrderLabelDTO

Данные для печати ярлыка.

Name

Description

orderId

Type: integer

Идентификатор заказа.

parcelBoxLabels

Type: ParcelBoxLabelDTO[]

Информация на ярлыке.

Example
[
  {
    "url": "example",
    "supplierName": "example",
    "deliveryServiceName": "example",
    "orderId": 0,
    "orderNum": "example",
    "recipientName": "example",
    "boxId": 0,
    "fulfilmentId": "example",
    "place": "example",
    "weight": "example",
    "deliveryServiceId": "example",
    "deliveryAddress": "example",
    "shipmentDate": "example"
  }
]

placesNumber

Type: integer

Количество коробок в заказе.

url

Type: Url

URL файла с ярлыками‑наклейками на все коробки в заказе.

Соответствует URL, по которому выполняется запрос GET v2/campaigns/{campaignId}/orders/{orderId}/delivery/labels.

Min length: 1

Max length: 2000

Example: example

Example
{
  "orderId": 0,
  "placesNumber": 0,
  "url": "example",
  "parcelBoxLabels": [
    {
      "url": null,
      "supplierName": "example",
      "deliveryServiceName": "example",
      "orderId": 0,
      "orderNum": "example",
      "recipientName": "example",
      "boxId": 0,
      "fulfilmentId": "example",
      "place": "example",
      "weight": "example",
      "deliveryServiceId": "example",
      "deliveryAddress": "example",
      "shipmentDate": "example"
    }
  ]
}

400 Bad Request

Запрос содержит неправильные данные. Подробнее об ошибке

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: ApiErrorResponse

    Стандартная обертка для ошибок сервера.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

ApiErrorDTO

Общий формат ошибки.

Name

Description

code

Type: string

Код ошибки.

Example: example

message

Type: string

Описание ошибки.

Example: example

Example
{
  "code": "example",
  "message": "example"
}

ApiErrorResponse

Стандартная обертка для ошибок сервера.

Type: object

All of 2 types
  • Type: ApiResponse

    Стандартная обертка для ответов сервера.

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    errors

    Type: ApiErrorDTO[] | null

    Список ошибок.

    Min items: 1

    Example
    [
      {
        "code": "example",
        "message": "example"
      }
    ]
    
    Example
    {
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    
Example
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

401 Unauthorized

В запросе не указаны данные для авторизации. Подробнее об ошибке

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: ApiErrorResponse

    Стандартная обертка для ошибок сервера.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

403 Forbidden

Данные для авторизации неверны или доступ к ресурсу запрещен. Подробнее об ошибке

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: ApiErrorResponse

    Стандартная обертка для ошибок сервера.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

404 Not Found

Запрашиваемый ресурс не найден. Подробнее об ошибке

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: ApiErrorResponse

    Стандартная обертка для ошибок сервера.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

420 Method Failure

Превышено ограничение на доступ к ресурсу. Подробнее об ошибке

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: ApiErrorResponse

    Стандартная обертка для ошибок сервера.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

500 Internal Server Error

Внутренняя ошибка Маркета. Подробнее об ошибке

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: ApiErrorResponse

    Стандартная обертка для ошибок сервера.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

No longer supported, please use an alternative and newer version.