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/12/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.3.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 770
{
"name": "Karelle Thompson",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": true,
"shop_ids": [
11,
17,
11
],
"seo": {
"title": {
"en": "Et ut tempore doloremque eos eos dolorum accusantium sunt ut."
},
"description": {
"en": "Praesentium dolore eligendi molestias a dolorum expedita ratione aliquam. Non quia explicabo est voluptate nobis sunt soluta. Alias minus nostrum ea nesciunt id et officiis."
},
"url": {
"en": "http://www.hyatt.biz/quo-illo-rerum-est-quas-nihil-nesciunt"
}
},
"product_ids": [
18,
19,
17
]
}
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: 13148
{
"name": "Quincy Russel Sr.",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": false,
"products": [
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"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": 19,
"maximum": 18,
"maximum_day": 19,
"maximum_week": 14
},
"weight": {
"minimum": 14,
"maximum": 18,
"maximum_day": 19,
"maximum_week": 18,
"suggested": 11
},
"persons": {
"minimum": 19,
"maximum": 18
}
},
"id": 10,
"allergens": [
{
"id": 12,
"name": "Crustaceans"
},
{
"id": 14,
"name": "Milk"
},
{
"id": 14,
"name": "Peanut"
}
],
"category_id": 13,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Illo eveniet tempore reiciendis culpa omnis ipsa numquam possimus."
},
"description": {
"en": "Minima id qui non id. Et dolorem consequatur voluptas est voluptas. Dolore et non ut molestias aliquam est dolor non. In quidem et expedita id omnis laborum."
},
"url": {
"en": "https://schinner.com/qui-ut-accusamus-ad-nisi.html"
}
},
"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": 16,
"maximum": 16,
"maximum_day": 19,
"maximum_week": 15
},
"weight": {
"minimum": 16,
"maximum": 17,
"maximum_day": 12,
"maximum_week": 15,
"suggested": 10
},
"persons": {
"minimum": 12,
"maximum": 19
}
},
"id": 18,
"allergens": [
{
"id": 11,
"name": "Celery"
},
{
"id": 10,
"name": "Sulphite"
},
{
"id": 12,
"name": "Mollusc"
}
],
"category_id": 16,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Laboriosam voluptas rerum totam sunt voluptatem."
},
"description": {
"en": "Possimus autem fugiat at at numquam ad iure nemo. Qui corporis earum praesentium est assumenda fuga rerum earum. Qui quidem et iure autem enim aut."
},
"url": {
"en": "http://www.marvin.com/quia-nihil-architecto-assumenda-at-est"
}
},
"code": "..."
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"active": true,
"only_order_in_store": false,
"price_type": "PER_UNIT",
"price": 19,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 12,
"maximum": 17,
"maximum_day": 12,
"maximum_week": 14
},
"weight": {
"minimum": 16,
"maximum": 18,
"maximum_day": 18,
"maximum_week": 14,
"suggested": 17
},
"persons": {
"minimum": 18,
"maximum": 11
}
},
"id": 19,
"allergens": [
{
"id": 17,
"name": "Nuts"
},
{
"id": 16,
"name": "Sulphite"
},
{
"id": 17,
"name": "Celery"
}
],
"category_id": 19,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Aliquam neque asperiores atque iusto ut est sapiente."
},
"description": {
"en": "Nisi officiis fugit error qui. In animi fuga rerum ex maxime explicabo doloremque. Aspernatur error vel sunt suscipit. Porro corporis dolor sit quis."
},
"url": {
"en": "http://vandervort.biz/et-animi-asperiores-nobis-sit-quibusdam-quam-ex"
}
},
"code": "..."
}
],
"shops": [
{
"name": "Neoma Hagenes",
"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": true,
"id": 16,
"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": "Prof. Arely Spinka II",
"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": true,
"delivery_use_intervals": true,
"id": 16,
"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": "Dr. Odie Pouros 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": 16,
"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
}
}
],
"id": 18,
"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": "Aperiam amet rerum non quam aspernatur nulla iure."
},
"description": {
"en": "Deserunt sed tenetur qui non. Quisquam tempora sit sunt et ut. Porro similique ratione dicta ipsam est facere."
},
"url": {
"en": "http://wilkinson.biz/"
}
}
}