更改订单

方法适用于模式拉斯.

目前不适用于卖家Market Yandex Go.

如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一

顺序的变化:

  • 收件人的详细信息;
  • 快递交货日期范围。

仅传输要更改的信息。 如有必要,您可以在同一时间编辑收件人的详细信息和传递间隔。

订单可以在交付给买方或取消之前以任何状态更改(DELIVEREDCANCELLED).

订单数据不会立即更新

仅在操作成功完成后,才会在几分钟内应用更改。 如何检查操作状态

⚙️ 限额: 10 000 请求 每小时

Request

POST

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

Path parameters

Name

Description

campaignId

Type: integer

广告系列(商店)的ID — 通过API工作时,代表您在Yandex市场系统中的商店的技术标识符。 它与您的商店唯一链接,但仅用于自动交互。

您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到它。 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:

  • 运动ID;
  • 标签 查询日志 →块中的下拉列表 显示日志.

⚠️ 不要把它与:

  • 商店的标识符,显示在商家的个人帐户中。
  • 广告活动。

Min value: 1

Body

application/json
{
  "order": {
    "id": 0,
    "deliveryInterval": {
      "deliveryDateInterval": {
        "fromDate": "2025-01-01",
        "toDate": "2025-01-01"
      },
      "deliveryTimeInterval": {
        "fromTime": "example",
        "toTime": "example"
      }
    },
    "customer": {
      "firstName": "example",
      "lastName": "example",
      "middleName": "example",
      "phone": "example"
    }
  }
}

Name

Description

order

Type: object

id

Type: integer

需要更改的订单的ID。

customer

Type: object

firstName

Type: string

姓名。

Min length: 1

Max length: 512

Example: example

lastName

Type: string

姓。

Min length: 1

Max length: 512

Example: example

phone

Type: string

电话号码。

格式: +<国家代码><region_code><电话号码>.

Min length: 5

Max length: 16

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

Example: example

middleName

Type: string

中间名。

Min length: 1

Max length: 512

Example: example

订单收件人或退款发件人的详细信息。

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

deliveryInterval

Type: object

deliveryDateInterval

Type: object

fromDate

Type: string<date>

间隔的开始。

日期格式: YYYY-MM-DD.

Example: 2025-01-01

toDate

Type: string<date>

间隔的结束。

日期格式: YYYY-MM-DD.

Example: 2025-01-01

交货日期的范围。

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

deliveryTimeInterval

Type: object

fromTime

Type: string

间隔的开始。

格式: HH:MM.

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

Example: example

toTime

Type: string

间隔的结束。

格式: HH:MM.

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

Example: example

的递送时间间隔。

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

日期和时间间隔。

Example
{
  "deliveryDateInterval": {
    "fromDate": "2025-01-01",
    "toDate": "2025-01-01"
  },
  "deliveryTimeInterval": {
    "fromTime": "example",
    "toTime": "example"
  }
}

需要更改的信息。

Example
{
  "id": 0,
  "deliveryInterval": {
    "deliveryDateInterval": {
      "fromDate": "2025-01-01",
      "toDate": "2025-01-01"
    },
    "deliveryTimeInterval": {
      "fromTime": "example",
      "toTime": "example"
    }
  },
  "customer": {
    "firstName": "example",
    "lastName": "example",
    "middleName": "example",
    "phone": "example"
  }
}

Responses

200 OK

订单修改操作的信息。

回答 200 这并不意味着数据已被更改。

如果请求成功,则会在一段时间后发生。 如何检查操作状态

Body

application/json
{
  "status": "OK",
  "result": {
    "operations": [
      {
        "id": "example",
        "type": "ORDER_RECIPIENT_UPDATE"
      }
    ]
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    响应的类型。 可能的值:

    • OK — 没有错误。
    • ERROR — 处理请求时出错。

    Enum: OK, ERROR

    服务器响应的标准包装器。

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

    result

    Type: object

    operations

    Type: object[]

    id

    Type: string

    操作的ID。

    Min length: 1

    Max length: 1000

    Example: example

    type

    Type: string

    操作类型:

    • ORDER_RECIPIENT_UPDATE — 更改收件人的数据。

    • ORDER_DELIVERY_INTERVAL_UPDATE — 更改交货日期间隔。

    • ORDER_STATUS_UPDATE — 更新订单状态以将其取消。

    • RETURN_CANCELLATION — 取消退款。

    Enum: ORDER_RECIPIENT_UPDATE, ORDER_DELIVERY_INTERVAL_UPDATE, ORDER_STATUS_UPDATE, RETURN_CANCELLATION

    有关运行操作以更改顺序的信息。

    Min items: 1

    Example
    [
      {
        "id": "example",
        "type": "ORDER_RECIPIENT_UPDATE"
      }
    ]
    

    订单修改操作的信息。

    Example
    {
      "operations": [
        {
          "id": "example",
          "type": "ORDER_RECIPIENT_UPDATE"
        }
      ]
    }
    
    Example
    {
      "result": {
        "operations": [
          {
            "id": "example",
            "type": "ORDER_RECIPIENT_UPDATE"
          }
        ]
      }
    }
    

400 Bad Request

请求包含不正确的数据。 详细了解处理订单时的错误

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      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: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

    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: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

    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: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

500 Internal Server Error

Yandex的内部错误。 市场。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

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

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

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

    服务器错误的标准包装器。

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

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