Update or upsert a product type
If no product type with this id exists for the account’s seller, one is created instead (upsert), returning 201.
PUT
/product_types/{id}Authorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idintegerrequiredRequest body
requiredapplication/jsonnamestringslugstringcart_quantity_multipleintegerunit_of_measurestringResponses
200Product type updated
201Product type did not exist — created instead
Request
curl -X PUT "https://api.onbolder.com/v2/product_types/1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Electronics Updated"
}'const response = await fetch("https://api.onbolder.com/v2/product_types/1", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Electronics Updated"
})
});import requests
response = requests.put(
"https://api.onbolder.com/v2/product_types/1",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"name": "Electronics Updated"
},
)Response
Product type updated
Product type did not exist — created instead