POST /v1/commerce/collections
POST
/v1/commerce/collectionsAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredRequest body
requiredapplication/jsonactivebooleanrequireddescriptionstringimage_urlstringorganization_idstringrequiredslugstringsort_orderinteger<int32>titlestringrequiredResponses
201Created
activebooleanrequireddescriptionstringidstringrequiredimage_urlstringproduct_countinteger<int32>slugstringrequiredsort_orderinteger<int32>requiredtitlestringrequireddefaultError
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/commerce/collections" \
-H "Content-Type: application/json" \
-d '{
"active": true,
"description": "string",
"image_url": "string",
"organization_id": "string",
"slug": "string",
"sort_order": 0,
"title": "string"
}'const response = await fetch("/v1/commerce/collections", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"active": true,
"description": "string",
"image_url": "string",
"organization_id": "string",
"slug": "string",
"sort_order": 0,
"title": "string"
})
});import requests
response = requests.post(
"/v1/commerce/collections",
headers={
"Content-Type": "application/json"
},
json={
"active": True,
"description": "string",
"image_url": "string",
"organization_id": "string",
"slug": "string",
"sort_order": 0,
"title": "string"
},
)Response
{
"active": true,
"description": "string",
"id": "string",
"image_url": "string",
"product_count": 0,
"slug": "string",
"sort_order": 0,
"title": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}