Update Category Discount
This API allows you to update a wholesale discount of a wholesale roles on a specific category.
Method
Endpoint
PUT
/wp-json/wholesale/v1/category-discount/{category_id}
Status: 200 OK
List all wholesale role discounts from a specific category.
PUT: /wp-json/wholesale/v1/category-discount/{category_id}
JSON Body:
{
"wholesale_customer" : 20,
"wholesale_bronze" : 10
}
Response:
{
"message": "Successfully updated category discount.",
"data": {
"wholesale_customer_wholesale_discount": 20,
"wholesale_bronze_wholesale_discount": 10
}
}Status: 400 Bad Request
The category id does not exist.
Status: 400 Bad Request
The wholesale role is invalid.
Last updated
Was this helpful?