版本:202201
创建集合关联
POST/openapi/2022-01/collects
将商品关联到指定集合。
请求
- application/json
- 请求体
- 示例
请求体
collect object
collection_idstring
Collection's ID, for example: 0097cfc8-63c3-45ed-ab9f-6f2231b700k9
product_idstring
Product's ID, for example: 0097cfc8-63c3-45ed-ab9f-6f2231b700k9
{
"collect": {
"collection_id": "string",
"product_id": "string"
}
}
响应
- 200
- 422
200
- application/json
- 数据结构
- 示例
- Result
数据结构
collect object
idstring
示例:
c0bcd1a9-8a42-4b8d-b2eb-b8a11b742da6collection_idstring
示例:
a60fe556-43ad-4e07-9125-507ac1bf71f7product_idstring
示例:
ea8f38ba-a152-4c64-a12c-50ea77ac4245positioninteger
默认值:
0示例:
2created_atstring
示例:
2024-04-16T11:34:32Zupdated_atstring
示例:
2024-04-16T11:34:32Z{
"collect": {
"id": "c0bcd1a9-8a42-4b8d-b2eb-b8a11b742da6",
"collection_id": "a60fe556-43ad-4e07-9125-507ac1bf71f7",
"product_id": "ea8f38ba-a152-4c64-a12c-50ea77ac4245",
"position": 2,
"created_at": "2024-04-16T11:34:32Z",
"updated_at": "2024-04-16T11:34:32Z"
}
}
{
"collect": {
"id": "c0bcd1a9-8a42-4b8d-b2eb-b8a11b742da6",
"collection_id": "a60fe556-43ad-4e07-9125-507ac1bf71f7",
"product_id": "ea8f38ba-a152-4c64-a12c-50ea77ac4245",
"position": 2,
"created_at": "2024-04-16T11:34:32Z",
"updated_at": "2024-04-16T11:34:32Z"
}
}
422
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"ProductId is required"
]
}
{
"errors": [
"ProductId is required"
]
}