Version: 202201
Create Collect
POST/openapi/2022-01/collects
Associates a product with a collection by creating a collect object.
Request
- application/json
- Body
- Example
Body
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"
}
}
Responses
- 200
- 422
200
- application/json
- Schema
- Example
- Result
Schema
collect object
idstring
Example:
c0bcd1a9-8a42-4b8d-b2eb-b8a11b742da6collection_idstring
Example:
a60fe556-43ad-4e07-9125-507ac1bf71f7product_idstring
Example:
ea8f38ba-a152-4c64-a12c-50ea77ac4245positioninteger
Default value:
0Example:
2created_atstring
Example:
2024-04-16T11:34:32Zupdated_atstring
Example:
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
- Schema
- Example
- Result
Schema
errorsstring[]
{
"errors": [
"ProductId is required"
]
}
{
"errors": [
"ProductId is required"
]
}