更新文件
方法适用于所有模式.
目前不适用于卖家Market Yandex Go.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- offers-and-cards-management — 商品和卡片管理
- all-methods — 全面管理账户
完全更新货物文件的数量,类型和日期。 每个请求最多可以更新100个文档。
对于每个文档,提供其标识符以及数字、类型和日期的当前值。 如果没有指定日期,以前保存的日期将被删除。 一个文档中的错误不会干扰其余文档的处理。
⚙️ 没有订阅的限制: 5 请求 每分钟 ⭐️ 使用中等订阅限制: 10 请求 每分钟 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v1/businesses/{businessId}/offers/documents/update
Path parameters
|
Name |
Description |
|
businessId |
Type: integer 内阁ID。 Min value: |
Body
application/json
{
"documents": [
{
"number": "example",
"type": "CONFORMITY_DECLARATION",
"activeFromDate": "2025-01-01",
"activeToDate": "2025-01-01",
"id": 1
}
]
}
|
Name |
Description |
|
documents |
Type: object[] 要更新的文件。 文档Id不应在同一查询中重复。 如果Id重复,则不处理请求。 Min items: Max items: Example
|
Responses
200 OK
如果更新了所有文档,则该字段 status 取值 OK,而场 result 它不会再回来了。
如果至少有一个文档无法更新,则该字段 status 取值 ERROR,而场
result 它只包含错误。 其余文件在同一时间处理。
Body
application/json
{
"status": "OK",
"result": {
"errors": [
{
"id": 1,
"code": "DOCUMENT_VALIDATION_FAILED",
"message": "example"
}
]
}
}
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
result
Type: object
errors
Type: object[]
code
Type: string
文档错误代码:
DOCUMENT_VALIDATION_FAILED— 该文件未经证实。DOCUMENT_ALREADY_EXISTS— 文档已经存在。DOCUMENT_NOT_FOUND— 文件没有找到。DOCUMENT_UPDATE_NOT_ALLOWED— 禁止文档修改。DOCUMENT_CONCURRENT_MODIFICATION— 文档进行了并行修改。
Enum:
DOCUMENT_VALIDATION_FAILED,DOCUMENT_ALREADY_EXISTS,DOCUMENT_NOT_FOUND,DOCUMENT_UPDATE_NOT_ALLOWED,DOCUMENT_CONCURRENT_MODIFICATIONid
Type: integer
文档的ID。
Min value:
1message
Type: string
人的错误描述。 要处理错误,请使用该字段
code.Example:
example文档处理错误。
Min items:
1Max items:
100Example
[ { "id": 1, "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ]无法更新的文档中的错误。
Example
{ "errors": [ { "id": 1, "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ] }Example
{ "result": { "errors": [ { "id": 1, "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ] } }
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:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "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:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "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:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "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:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "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:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -