Create a supplier product category
POST/api/v1/suppliers/:id/supplier_product_categories
Create a supplier product category
Request
Path Parameters
- application/vnd.api+json
Body
required
data
object
Possible values: [supplier_product_categories
]
attributes
object
The name of the category or subcategory.
French translation of the name
German translation of the name
Italian translation of the name
Spanish translation of the name
Greek translation of the name
(DEPRECATED - use parent_category relationship instead) The name of the parent category. Leave blank if you want to create a top-level 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 created
Responses
- 201
Create a supplier product category
- 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",
"name-fr": "string",
"name-de": "string",
"name-it": "string",
"name-es": "string",
"name-el": "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",
"name-fr": "French translation of Category Name",
"name-de": "German translation of Category Name",
"name-it": "Italian translation of Category Name",
"name-es": "Spanish translation of Category Name",
"name-el": "Greek translation of 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
}
}
}