POST /v1/commerce/categories
POST
/v1/commerce/categoriesAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredRequest body
requiredapplication/jsonactivebooleanrequirednamestringrequiredorganization_idstringrequiredparent_idstringslugstringsort_orderinteger<int32>Responses
201Created
activebooleanrequiredidstringrequirednamestringrequiredorganization_idstringparent_idstringslugstringrequiredsort_orderinteger<int32>requireddefaultError
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/commerce/categories" \
-H "Content-Type: application/json" \
-d '{
"active": true,
"name": "string",
"organization_id": "string",
"parent_id": "string",
"slug": "string",
"sort_order": 0
}'const response = await fetch("/v1/commerce/categories", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"active": true,
"name": "string",
"organization_id": "string",
"parent_id": "string",
"slug": "string",
"sort_order": 0
})
});import requests
response = requests.post(
"/v1/commerce/categories",
headers={
"Content-Type": "application/json"
},
json={
"active": True,
"name": "string",
"organization_id": "string",
"parent_id": "string",
"slug": "string",
"sort_order": 0
},
)Response
{
"active": true,
"id": "string",
"name": "string",
"organization_id": "string",
"parent_id": "string",
"slug": "string",
"sort_order": 0
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}