Create a product type
POST
/product_typesAuthorization
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsonshop_idintegerrequirednamestringrequiredslugstringdescriptionstringcart_quantity_multipleintegerunit_of_measurestringunit_display_quantityintegerResponses
201Product type created
Request
curl -X POST "https://api.onbolder.com/v2/product_types" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"shop_id": 1,
"name": "Electronics",
"slug": "electronics"
}'const response = await fetch("https://api.onbolder.com/v2/product_types", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"shop_id": 1,
"name": "Electronics",
"slug": "electronics"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/product_types",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"shop_id": 1,
"name": "Electronics",
"slug": "electronics"
},
)Response
{
"id": 2,
"slug": "electronics",
"name": "Electronics",
"cart_max_quantity_per_product": null,
"cart_quantity_multiple": null
}