Creating an order

The method is available for the LaaS model.

Not yet available for Market Yandex Go sellers.

If you are using an API Key token, one of the accesses in the list is required to call the method

Creates a new order if the required quantity of goods is in the Market warehouse.

Specify courierDelivery for courier delivery or pickupDelivery for delivery to the pick-up point. Do not pass both parameters at the same time.

Parameter Value draft:

  • true — Yandex.Market will create an order with the status RESERVED and it will wait for confirmation from the store. When you are ready, send the status PROCESSING with a sub-status STARTED in the method PUT v2/campaigns/{campaignId}/orders/{orderId}/status. If you do not do this within an hour after creating the order, yandex.Market will cancel it.
  • false — Yandex.Market will create an order with the status PROCESSING with a sub-status STARTED confirmation is not required.

Before calling the method

Get available shipping options — POST v2/campaigns/{campaignId}/delivery-options.

⚙️ Limit: 10 000 requests per hour

Request

POST

https://api.partner.market.yandex.ru/v1/campaigns/{campaignId}/orders/create

Path parameters

Name

Description

campaignId

Type: integer

The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.

You can find it using a query GET v2/campaigns or find it in the seller's office on the Market. Click on your account icon → Settings and in the menu on the left, select APIs and modules:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ Do not confuse it with:

  • the store's identifier, which is displayed in the merchant's personal account.
  • advertising campaigns.

Min value: 1

Body

application/json
{
  "order": {
    "externalOrderId": "example",
    "itemsDelivery": [
      {
        "warehouseId": 1,
        "items": [
          {}
        ],
        "deliveryDateInterval": {
          "fromDate": "2025-01-01",
          "toDate": "2025-01-01"
        },
        "deliveryTimeInterval": {
          "fromTime": "example",
          "toTime": "example"
        }
      }
    ],
    "destination": {
      "pickupDelivery": {
        "logisticPointId": 1
      },
      "courierDelivery": {
        "address": {},
        "notes": "example"
      }
    },
    "customer": {
      "firstName": "example",
      "lastName": "example",
      "middleName": "example",
      "phone": "example"
    },
    "packaging": {
      "packageType": "WHITELABEL"
    },
    "paymentType": "PREPAID",
    "draft": false
  }
}

Name

Description

order

Type: object

customer

Type: object

firstName

Type: string

Name.

Min length: 1

Max length: 512

Example: example

lastName

Type: string

Surname.

Min length: 1

Max length: 512

Example: example

phone

Type: string

Phone number.

Format: +<country code><region_code><phone number>.

Min length: 5

Max length: 16

Pattern: ^\+[0-9]+$

Example: example

middleName

Type: string

Middle name.

Min length: 1

Max length: 512

Example: example

Details of the recipient of the order or the sender of the refund.

Example
{
  "firstName": "example",
  "lastName": "example",
  "middleName": "example",
  "phone": "example"
}

destination

Type: object

courierDelivery

Type: object

address

Type: object

All of 2 types
  • Type: object

    fullAddress

    Type: string

    The full address, down to the house number.

    Min length: 1

    Max length: 512

    Example: example

    The delivery address.

    Example
    {
      "fullAddress": "example"
    }
    
  • Type: object

    apartment

    Type: string

    Apartment or office number.

    Min length: 1

    Max length: 16

    Example: example

    entrance

    Type: string

    Entrance number.

    Min length: 1

    Max length: 16

    Example: example

    floor

    Type: integer

    Floor.

    Example
    {
      "entrance": "example",
      "floor": 0,
      "apartment": "example"
    }
    

The delivery address.

Example
{
  "fullAddress": "example",
  "entrance": "example",
  "floor": 0,
  "apartment": "example"
}

notes

Type: string

Comment on the order.

Min length: 1

Max length: 3000

Example: example

Information about courier delivery.

Do not transmit together with pickupDelivery.

Example
{
  "address": {
    "fullAddress": "example",
    "entrance": "example",
    "floor": 0,
    "apartment": "example"
  },
  "notes": "example"
}

pickupDelivery

Type: object

logisticPointId

Type: integer

ID of the pick-up point.

It can be found using the method POST v1/businesses/{businessId}/logistics-points.

Min value: 1

Information about delivery to the pick-up point.

Do not transmit together with courierDelivery.

Example
{
  "logisticPointId": 1
}

Delivery information.

Do not transmit at the same time courierDelivery and pickupDelivery.

Example
{
  "pickupDelivery": {
    "logisticPointId": 1
  },
  "courierDelivery": {
    "address": {
      "fullAddress": "example",
      "entrance": "example",
      "floor": 0,
      "apartment": "example"
    },
    "notes": "example"
  }
}

externalOrderId

Type: string

The external order ID in the store's system.

Min length: 1

Example: example

itemsDelivery

Type: object[]

deliveryDateInterval

Type: object

fromDate

Type: string<date>

The beginning of the interval.

Date format: YYYY-MM-DD.

Example: 2025-01-01

toDate

Type: string<date>

End of the interval.

Date format: YYYY-MM-DD.

Example: 2025-01-01

The range of delivery dates.

Example
{
  "fromDate": "2025-01-01",
  "toDate": "2025-01-01"
}

items

Type: object[]

The list of products in the order.

Within a single query, all values are offerId they must be unique. It is not allowed to transfer two objects with the same name. offerId.

Min items: 1

Max items: 1000

Example
[
  {
    "offerId": "example",
    "count": 1,
    "price": {
      "value": 0,
      "currencyId": "RUR"
    }
  }
]

warehouseId

Type: integer

ID of the fulfillment warehouse of the Market.

Get it using the method POST v2/campaigns/{campaignId}/delivery-options.

Min value: 1

deliveryTimeInterval

Type: object

fromTime

Type: string

The beginning of the interval.

Format: HH:MM.

Pattern: ^([0-1][0-9]&#124;2[0-3]):[0-5][0-9]$

Example: example

toTime

Type: string

End of the interval.

Format: HH:MM.

Pattern: ^([0-1][0-9]&#124;2[0-3]):[0-5][0-9]$

Example: example

The delivery time interval.

Example
{
  "fromTime": "example",
  "toTime": "example"
}

The list of products in the order.

Min items: 1

Max items: 1000

Example
[
  {
    "warehouseId": 1,
    "items": [
      {
        "offerId": "example",
        "count": 1,
        "price": {}
      }
    ],
    "deliveryDateInterval": {
      "fromDate": "2025-01-01",
      "toDate": "2025-01-01"
    },
    "deliveryTimeInterval": {
      "fromTime": "example",
      "toTime": "example"
    }
  }
]

packaging

Type: object

packageType

Type: string

Packaging requirements:

  • WHITELABEL — box.

  • BRANDbranded packaging the store.

If you don't pass it packageType, the order will arrive in a box or without packaging.

Enum: WHITELABEL, BRAND

Rules for packing goods in an order.

Example
{
  "packageType": "WHITELABEL"
}

paymentType

Type: string

Order payment type:

  • PREPAID — payment at checkout.

Const: PREPAID

Example: example

draft

Type: boolean

Indicates whether an order draft has been created.

  • true — Yandex.Market will create an order with the status RESERVED and it will wait for confirmation from the store.
  • false — Yandex.Market will create an order with the status PROCESSING with a sub-status STARTED and it will start processing it, no additional confirmations are required.

Default: false

Order information.

Transmit the selected delivery option from the method response POST v1/campaigns/{campaignId}/delivery-options.

Example
{
  "externalOrderId": "example",
  "itemsDelivery": [
    {
      "warehouseId": 1,
      "items": [
        {}
      ],
      "deliveryDateInterval": {
        "fromDate": "2025-01-01",
        "toDate": "2025-01-01"
      },
      "deliveryTimeInterval": {
        "fromTime": "example",
        "toTime": "example"
      }
    }
  ],
  "destination": {
    "pickupDelivery": {
      "logisticPointId": 1
    },
    "courierDelivery": {
      "address": {
        "fullAddress": "example",
        "entrance": "example",
        "floor": 0,
        "apartment": "example"
      },
      "notes": "example"
    }
  },
  "customer": {
    "firstName": "example",
    "lastName": "example",
    "middleName": "example",
    "phone": "example"
  },
  "packaging": {
    "packageType": "WHITELABEL"
  },
  "paymentType": "PREPAID",
  "draft": false
}

Responses

200 OK

Information about created orders.

Body

application/json
{
  "status": "OK",
  "result": {
    "orders": [
      {
        "id": 0
      }
    ]
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    The type of response. Possible values:

    • OK — There are no errors.
    • ERROR — an error occurred while processing the request.

    Enum: OK, ERROR

    The standard wrapper for server responses.

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

    result

    Type: object

    orders

    Type: object[]

    id

    Type: integer

    The order ID.

    Orders created.

    Min items: 1

    Example
    [
      {
        "id": 0
      }
    ]
    

    Information about created orders.

    One order for each warehouse.

    Example
    {
      "orders": [
        {
          "id": 0
        }
      ]
    }
    
    Example
    {
      "result": {
        "orders": [
          {
            "id": 0
          }
        ]
      }
    }
    

400 Bad Request

The request contains incorrect data. Learn more about errors when working with orders

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

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

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

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

    A standard wrapper for server errors.

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

401 Unauthorized

The authorization data is not specified in the request. More information about the error

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

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

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

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

    A standard wrapper for server errors.

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

403 Forbidden

The authorization data is incorrect or access to the resource is prohibited. More information about the error

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

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

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

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

    A standard wrapper for server errors.

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

420 Method Failure

The resource access limit has been exceeded. More information about the error

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

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

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

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

    A standard wrapper for server errors.

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

500 Internal Server Error

Internal error of Yandex. Market. More information about the error

Body

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

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      The type of response. Possible values:

      • OK — There are no errors.
      • ERROR — an error occurred while processing the request.

      Enum: OK, ERROR

      The standard wrapper for server responses.

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

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

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

    A standard wrapper for server errors.

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

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

Bring it in advance to the Market warehouse where your goods are stored.