POST /company/companies/@id/categories
This endpoint requires authentication.
Header | Value |
---|---|
Authorization | Set the value to Bearer + + access_token |
Replace the @ keywords in the URL with their corresponding value.
A dictionary with fields
Field | Type | Description |
---|---|---|
id | Int | The company where to create a new category |
Pass the following properties via application/json or form encoding in the body of the request.
Field | Type | Description |
---|---|---|
name | [Language: String] | Translated category name |
description | [Language: String] | Description of this category |
active | Bool | A boolean value |
only_order_in_store | Bool | Whether this product can only get ordered in the store with a separate UI for the shop employees, and not in the public webshop |
shop_ids | [Int] | Minimum 1. IDs of the shops the category will be available for |
seo | company.SeoData | Optional. The category's webpage search engine metatags |
product_ids | [Int] | Optional. Set the order of the products in a category by setting the IDs of the products in the right order. You can't add or remove products, only change the order. Don't set this field if you don't want to make changes. |
POST /company/companies/19/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.0.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 681
{
"name": "Judy Reilly",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": false,
"shop_ids": [
19,
10,
15
],
"seo": {
"title": {
"en": "Quia ut nam voluptates assumenda dignissimos ex."
},
"description": {
"en": "Et hic eos nisi enim quo accusamus et. Suscipit rerum exercitationem tempore quis autem."
},
"url": {
"en": "https://www.bogisich.com/inventore-et-maiores-ea-consequatur-autem-minus"
}
},
"product_ids": [
10,
16,
19
]
}
Field | Type | Description |
---|---|---|
name | [Language: String] | Translated category name |
description | [Language: String] | Description of this category |
active | Bool | A boolean value |
only_order_in_store | Bool | Whether this product can only get ordered in the store with a separate UI for the shop employees, and not in the public webshop |
products | [company.Product.simple] | Array of company.Product.simple |
shops | [company.Shop.simple] | Array of company.Shop.simple |
id | Int | ID of the category |
banner | Image? | Nullable. |
seo | company.SeoData | Optional. The category's webpage search engine metatags |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 13093
{
"name": "Lew Bartoletti",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": true,
"only_order_in_store": true,
"products": [
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"active": true,
"only_order_in_store": true,
"price_type": "PER_UNIT",
"price": 18,
"target_price": false,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 12,
"maximum": 12,
"maximum_day": 11,
"maximum_week": 10
},
"weight": {
"minimum": 13,
"maximum": 13,
"maximum_day": 16,
"maximum_week": 14,
"suggested": 17
},
"persons": {
"minimum": 16,
"maximum": 14
}
},
"id": 14,
"allergens": [
{
"id": 18,
"name": "Sesame"
},
{
"id": 14,
"name": "Celery"
},
{
"id": 12,
"name": "Mustard"
}
],
"category_id": 10,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Qui ipsam libero et dolor quam sed."
},
"description": {
"en": "Ducimus nulla quos natus est. Ea quia doloremque aspernatur occaecati et. Et repudiandae molestiae sit eos et fugiat."
},
"url": {
"en": "https://www.senger.com/sed-molestiae-sit-qui"
}
},
"code": "..."
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"active": false,
"only_order_in_store": true,
"price_type": "PER_UNIT",
"price": 11,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 18,
"maximum": 15,
"maximum_day": 11,
"maximum_week": 12
},
"weight": {
"minimum": 11,
"maximum": 15,
"maximum_day": 14,
"maximum_week": 18,
"suggested": 10
},
"persons": {
"minimum": 10,
"maximum": 16
}
},
"id": 10,
"allergens": [
{
"id": 18,
"name": "Gluten"
},
{
"id": 14,
"name": "Soy"
},
{
"id": 14,
"name": "Lactose"
}
],
"category_id": 11,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Ut quia repellat placeat voluptatem ratione facere perferendis voluptatem ut quas."
},
"description": {
"en": "Ea quaerat ut et quae autem sit. Architecto sit sed dicta eaque porro modi. Nostrum sit vitae minima labore magnam provident."
},
"url": {
"en": "http://maggio.com/nesciunt-ullam-voluptatibus-soluta-in-expedita-dolorem-repudiandae.html"
}
},
"code": "..."
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"active": false,
"only_order_in_store": true,
"price_type": "PER_UNIT",
"price": 17,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 19,
"maximum": 16,
"maximum_day": 17,
"maximum_week": 19
},
"weight": {
"minimum": 16,
"maximum": 19,
"maximum_day": 12,
"maximum_week": 14,
"suggested": 14
},
"persons": {
"minimum": 12,
"maximum": 13
}
},
"id": 18,
"allergens": [
{
"id": 18,
"name": "Celery"
},
{
"id": 15,
"name": "Lupine"
},
{
"id": 11,
"name": "Sesame"
}
],
"category_id": 19,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Veniam omnis dolor minima earum officia aut ab quo nemo laboriosam rerum."
},
"description": {
"en": "Sed exercitationem illum facere sit laboriosam molestiae et adipisci. Nemo autem eveniet quas."
},
"url": {
"en": "http://nader.net/similique-doloribus-magni-est-quis.html"
}
},
"code": "..."
}
],
"shops": [
{
"name": "Stacy Fadel V",
"active": true,
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
},
"allow_comments": false,
"allow_orders": false,
"delivery_use_intervals": true,
"id": 11,
"avatar": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": false
},
"banner": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": true
}
},
{
"name": "Blanche Prohaska Jr.",
"active": false,
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
},
"allow_comments": true,
"allow_orders": false,
"delivery_use_intervals": true,
"id": 14,
"avatar": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": false
},
"banner": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": false
}
},
{
"name": "Annalise Hoppe MD",
"active": false,
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
},
"allow_comments": true,
"allow_orders": false,
"delivery_use_intervals": false,
"id": 10,
"avatar": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": true
},
"banner": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": true
}
}
],
"id": 19,
"banner": {
"resolutions": [
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
},
{
"src": "https://example.com",
"width": 600,
"height": 350
}
],
"white_background": true
},
"seo": {
"title": {
"en": "Deleniti totam expedita quas voluptatem fugit quae consequuntur aut."
},
"description": {
"en": "Et fuga non rerum recusandae a eaque. Nemo voluptate optio consequatur et ut dolorem. Placeat explicabo quia et fugiat dolores ipsum."
},
"url": {
"en": "http://www.schuppe.info/"
}
}
}