获取有关授权令牌的信息
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- inventory-and-order-processing — 订单处理和商品核算
- inventory-and-order-processing:read-only — 查看订单信息
- pricing — 价格管理
- pricing:read-only — 查看价格
- offers-and-cards-management — 商品和卡片管理
- offers-and-cards-management:read-only — 查看商品和卡片
- promotion — 商品推广
- promotion:read-only — 查看商品推广信息
- finance-and-accounting — 查看财务信息和报告
- communication — 与买家沟通
- settings-management — 店铺设置
- supplies-management:read-only — 获取有关FBY应用程序的信息
- all-methods — 全面管理账户
- all-methods:read-only — 查看所有数据
该方法仅适用于Api密钥令牌。
返回有关传输的授权令牌的信息。
**⚙️ 限制:**每小时100个请求 |
---|
Request
POST
https://api.partner.market.yandex.ru/v2/auth/token
Responses
200 OK
授权令牌的信息。
Body
application/json
{
"status": "OK",
"result": {
"apiKey": {
"name": "string",
"authScopes": [
"ALL_METHODS"
]
}
}
}
Name |
Description |
result* |
Type: TokenDTO 授权令牌的信息。 |
status* |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
ApiResponseStatusType
响应的类型。 可能的值:
OK
-没有错误。ERROR
-处理请求时发生错误。
Type |
Description |
Enum: |
ApiKeyDTO
有关Api密钥令牌的信息。
Name |
Description |
authScopes* |
Type: ApiKeyScopeType[] 使用Api密钥令牌访问方法。
Enum: Unique items |
name* |
Type: string 令牌的名称。 Min length: Max length: |
ApiKeyScopeType
方法的访问:
ALL_METHODS
-全面的内阁管理。ALL_METHODS_READ_ONLY
-查看机柜中的所有信息。INVENTORY_AND_ORDER_PROCESSING
-货物的订单处理和核算。INVENTORY_AND_ORDER_PROCESSING_READ_ONLY
-查看有关订单的信息。PRICING
-价格管理。PRICING_READ_ONLY
-查看价格。OFFERS_AND_CARDS_MANAGEMENT
-商品和卡片的管理。OFFERS_AND_CARDS_MANAGEMENT_READ_ONLY
-查看产品和卡片。PROMOTION
-产品推广。PROMOTION_READ_ONLY
-查看有关产品促销的信息。FINANCE_AND_ACCOUNTING
-查看财务信息和报表。COMMUNICATION
-与客户沟通。SETTINGS_MANAGEMENT
-设立商店。SUPPLIES_MANAGEMENT_READ_ONLY
-接收有关FBY应用程序的信息。
Type |
Description |
Enum: |
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
ApiErrorDTO
一般错误格式。
Name |
Description |
code* |
Type: string 的错误代码。 |
message |
Type: string 错误的描述。 |
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
500 Internal Server Error
市场的内部错误。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
No longer supported, please use an alternative and newer version.