Update a Supplier Product Category for current Supplier
PATCH/api/v1/suppliers/:id/supplier_product_categories/:category_id
Update a Supplier Product Category for current Supplier
Request
Path Parameters
- application/vnd.api+json
Body
required
data
object
Possible values: [supplier_product_categories
]
attributes
object
(DEPRECATED - use parent_category relationship instead). You can either: Use "nil" to make this category a main category (i.e. with no parent category). Use the current parent_category_name to keep the parent category unchanged. Provide an other existing supplier product category name to change the parent category.
delivery_schedule
object
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00
24h format in seconds, max 86400s.
Provide the time in seconds.
Customizable field that you can use to set a custom category ID. The length of the string can't exceed 100 characters.
relationships
object
parent_category
object
data
object
Possible values: [supplier_product_categories
]
ID of SupplierProductCategory which will be immediate parent of the category that is being updated. Use "id": null
to transform this category in a main one (without parent). In order to keep current parent_category skip this relationship while updating this category.
Responses
- 200
Update a Supplier Product Category for current Supplier
- application/vnd.api+json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
data
object
required
attributes
object
children
object[]
{
"data": {
"id": "string",
"type": "string",
"attributes": {
"name": "string",
"children": [
{
"id": "string",
"name": "string"
}
],
"custom-category-id": "string",
"parent-category": "string",
"parent-name": "string",
"delivery-schedule": {},
"ordering-deadline": 0,
"ordering-lead-time": 0
}
}
}
{
"data": {
"id": "d0f96dc7-0d07-44c5-984b-8000b5a3b3af",
"type": "supplier-product-categories",
"attributes": {
"name": "Updated Category Name",
"parent-category": "fb0a19d1-012b-54da-ae40-ff17c0f12b97",
"parent-name": "Parent Category",
"children": [
{
"name": "Child Category",
"id": "c0f68dc7-0f07-43c5-984b-8002b5a7b3ad"
}
],
"custom-category-id": "A113",
"delivery-schedule": {
"id": "1e24a232-7862-477f-8184-231835169047",
"monday": [
2,
660
],
"tuesday": [],
"wednesday": [],
"thursday": [],
"friday": [],
"saturday": [],
"sunday": []
},
"ordering-deadline": 57600,
"ordering-lead-time": 172800
}
}
}