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. |
code | String? | Optional. Nullable. A custom code. You can set this to your own code and use this field to map your categories to Bakeronline categories |
POST /company/companies/16/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.9.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 764
{
"name": "Nichole Kub",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": false,
"shop_ids": [
13,
19,
18
],
"seo": {
"title": {
"en": "Non rerum fugiat minima voluptatum veritatis autem voluptas placeat ut."
},
"description": {
"en": "Quis asperiores dignissimos nobis. Quas enim quod laborum eveniet non. Corrupti explicabo est dolorem aliquam laboriosam. Dolor error quisquam omnis rerum."
},
"url": {
"en": "http://wiegand.com/unde-quia-hic-non-accusamus"
}
},
"product_ids": [
15,
12,
15
],
"code": "..."
}
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 |
code | String? | Nullable. A custom code. You can set this to your own code and use this field to map your categories to Bakeronline categories |
id | Int | ID of the category |
banner | Image? | Nullable. |
overview_image | 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: 18187
{
"name": "Miss Felicity Schaden V",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"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": 11,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 16,
"maximum": 12,
"maximum_day": 17,
"maximum_week": 19
},
"weight": {
"minimum": 18,
"maximum": 15,
"maximum_day": 16,
"maximum_week": 11,
"suggested": 12
},
"persons": {
"minimum": 10,
"maximum": 13
}
},
"id": 10,
"allergens": [
{
"id": 19,
"name": "Mollusc"
},
{
"id": 16,
"name": "Lupine"
},
{
"id": 16,
"name": "Mollusc"
}
],
"category_id": 18,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Corporis dignissimos accusantium iste ut omnis."
},
"description": {
"en": "Et delectus exercitationem consequuntur ducimus accusamus praesentium. Tempora quidem ut iste veniam ut quia. Est dicta optio inventore ratione."
},
"url": {
"en": "http://www.mosciski.com/"
}
},
"origin": {
"nl": "...",
"en": "...",
"fr": "..."
},
"ingredients": {
"nl": "...",
"en": "...",
"fr": "..."
},
"temperature_type": "any",
"warranty_type": "none",
"warranty_price": 14,
"stock": {
"soldout": true,
"amount": 12,
"soldoutUntil": "2019-01-31 12:00"
},
"daysavailable": [
13,
13,
13
],
"upfront": {
"upfront_use_default": false,
"upfront_type": "days",
"upfront_days": 12,
"upfront_time": "12:00",
"upfront_hours": 12,
"upfront_minutes": 17
},
"use_pickup_after": false,
"pickup_after": "12:00",
"use_pickup_before": false,
"pickup_before": "12:00",
"related_products": [
13,
16,
11
]
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"active": false,
"only_order_in_store": false,
"price_type": "PER_UNIT",
"price": 13,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 14,
"maximum": 17,
"maximum_day": 16,
"maximum_week": 19
},
"weight": {
"minimum": 18,
"maximum": 16,
"maximum_day": 10,
"maximum_week": 19,
"suggested": 13
},
"persons": {
"minimum": 15,
"maximum": 10
}
},
"id": 15,
"allergens": [
{
"id": 14,
"name": "Celery"
},
{
"id": 12,
"name": "Egg"
},
{
"id": 12,
"name": "Celery"
}
],
"category_id": 14,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Tenetur vitae error incidunt sapiente repellendus qui aut voluptas sit deleniti."
},
"description": {
"en": "Ipsa beatae ullam rerum quia sint. Reprehenderit voluptatem et natus sed neque dolores iusto dolor. Laborum dolores molestias sunt explicabo ut nihil."
},
"url": {
"en": "https://www.purdy.com/sequi-alias-dolore-eius-doloribus-non-iusto-sequi"
}
},
"origin": {
"nl": "...",
"en": "...",
"fr": "..."
},
"ingredients": {
"nl": "...",
"en": "...",
"fr": "..."
},
"temperature_type": "any",
"warranty_type": "none",
"warranty_price": 11,
"stock": {
"soldout": true,
"amount": 19,
"soldoutUntil": "2019-01-31 12:00"
},
"daysavailable": [
12,
14,
19
],
"upfront": {
"upfront_use_default": true,
"upfront_type": "days",
"upfront_days": 10,
"upfront_time": "12:00",
"upfront_hours": 17,
"upfront_minutes": 16
},
"use_pickup_after": true,
"pickup_after": "12:00",
"use_pickup_before": true,
"pickup_before": "12:00",
"related_products": [
14,
14,
13
]
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"active": true,
"only_order_in_store": false,
"price_type": "PER_UNIT",
"price": 16,
"target_price": false,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 17,
"maximum": 19,
"maximum_day": 18,
"maximum_week": 12
},
"weight": {
"minimum": 10,
"maximum": 10,
"maximum_day": 15,
"maximum_week": 10,
"suggested": 11
},
"persons": {
"minimum": 17,
"maximum": 14
}
},
"id": 11,
"allergens": [
{
"id": 14,
"name": "Sesame"
},
{
"id": 12,
"name": "Milk"
},
{
"id": 19,
"name": "Gluten"
}
],
"category_id": 18,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Vel officiis quam consectetur aspernatur eos deleniti quia aliquam et deserunt."
},
"description": {
"en": "Blanditiis eos rerum perspiciatis voluptate. Nostrum accusantium atque maiores modi. Hic cupiditate repellendus optio at consequatur. Error veniam rem rerum quam quo et."
},
"url": {
"en": "http://www.reichel.org/ut-esse-aut-saepe-veritatis-placeat-animi"
}
},
"origin": {
"nl": "...",
"en": "...",
"fr": "..."
},
"ingredients": {
"nl": "...",
"en": "...",
"fr": "..."
},
"temperature_type": "any",
"warranty_type": "none",
"warranty_price": 11,
"stock": {
"soldout": false,
"amount": 17,
"soldoutUntil": "2019-01-31 12:00"
},
"daysavailable": [
12,
14,
13
],
"upfront": {
"upfront_use_default": true,
"upfront_type": "days",
"upfront_days": 16,
"upfront_time": "12:00",
"upfront_hours": 13,
"upfront_minutes": 17
},
"use_pickup_after": true,
"pickup_after": "12:00",
"use_pickup_before": true,
"pickup_before": "12:00",
"related_products": [
17,
10,
14
]
}
],
"shops": [
{
"name": "Mario Fritsch Sr.",
"active": true,
"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,
"allow_invoices": false,
"allow_order_comments": true,
"allow_product_comments": false,
"takeout_use_intervals": false,
"allow_order_messages": false,
"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
}
],
"file_id": 12,
"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
}
],
"file_id": 17,
"white_background": true
},
"url": "..."
},
{
"name": "Edd Flatley DDS",
"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": true,
"delivery_use_intervals": false,
"allow_invoices": false,
"allow_order_comments": true,
"allow_product_comments": false,
"takeout_use_intervals": true,
"allow_order_messages": false,
"id": 18,
"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
}
],
"file_id": 18,
"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
}
],
"file_id": 15,
"white_background": true
},
"url": "..."
},
{
"name": "Jany Goyette",
"active": true,
"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,
"allow_invoices": false,
"allow_order_comments": false,
"allow_product_comments": false,
"takeout_use_intervals": false,
"allow_order_messages": true,
"id": 18,
"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
}
],
"file_id": 13,
"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
}
],
"file_id": 12,
"white_background": true
},
"url": "..."
}
],
"code": "...",
"id": 14,
"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
}
],
"file_id": 14,
"white_background": true
},
"overview_image": {
"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
}
],
"file_id": 13,
"white_background": true
},
"seo": {
"title": {
"en": "Doloremque debitis architecto quidem id officiis qui iusto."
},
"description": {
"en": "Debitis consequatur consequatur accusamus eius sed sint sunt. Explicabo eum laboriosam non consectetur sit. Facilis et odit nam ut."
},
"url": {
"en": "http://www.streich.com/inventore-doloremque-iure-corporis-ut-nobis-dolore"
}
}
}