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.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 668
{
"name": "Joey Koch PhD",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": true,
"shop_ids": [
14,
15,
11
],
"seo": {
"title": {
"en": "Eum autem perspiciatis tenetur esse suscipit."
},
"description": {
"en": "Nesciunt sit dolore quae quisquam et quis. Quo voluptas harum accusamus voluptatem nisi. Accusantium autem fugit numquam minima."
},
"url": {
"en": "http://www.blick.net/"
}
},
"product_ids": [
18,
13,
18
]
}
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: 13235
{
"name": "Blaze Feeney",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": true,
"products": [
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"active": false,
"only_order_in_store": true,
"price_type": "PER_UNIT",
"price": 19,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 11,
"maximum": 12,
"maximum_day": 13,
"maximum_week": 13
},
"weight": {
"minimum": 13,
"maximum": 15,
"maximum_day": 16,
"maximum_week": 10,
"suggested": 10
},
"persons": {
"minimum": 17,
"maximum": 12
}
},
"id": 12,
"allergens": [
{
"id": 12,
"name": "Sulphite"
},
{
"id": 11,
"name": "Sesame"
},
{
"id": 10,
"name": "Gluten"
}
],
"category_id": 14,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Occaecati molestiae doloremque id aut accusantium nihil animi molestiae."
},
"description": {
"en": "Voluptates est et voluptates quia et in sint. Similique explicabo qui nihil esse est rerum. Suscipit adipisci omnis nihil enim. Non non velit nihil aperiam similique nihil aspernatur laudantium."
},
"url": {
"en": "http://barrows.com/aut-vitae-velit-ipsum-quos-provident-est-ea"
}
}
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"active": true,
"only_order_in_store": false,
"price_type": "PER_UNIT",
"price": 18,
"target_price": false,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 10,
"maximum": 15,
"maximum_day": 14,
"maximum_week": 17
},
"weight": {
"minimum": 16,
"maximum": 12,
"maximum_day": 18,
"maximum_week": 14,
"suggested": 14
},
"persons": {
"minimum": 17,
"maximum": 14
}
},
"id": 18,
"allergens": [
{
"id": 19,
"name": "Lactose"
},
{
"id": 11,
"name": "Sulphite"
},
{
"id": 17,
"name": "Crustaceans"
}
],
"category_id": 18,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Incidunt perspiciatis ducimus error nobis praesentium tempore."
},
"description": {
"en": "Aut dolores dolorem quae. Fugit id iusto nobis sit. Alias non est eos error tempore vel sed. Numquam commodi veritatis molestiae adipisci."
},
"url": {
"en": "http://www.bradtke.com/"
}
}
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"active": false,
"only_order_in_store": true,
"price_type": "PER_UNIT",
"price": 18,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 12,
"maximum": 16,
"maximum_day": 17,
"maximum_week": 17
},
"weight": {
"minimum": 17,
"maximum": 16,
"maximum_day": 15,
"maximum_week": 16,
"suggested": 19
},
"persons": {
"minimum": 13,
"maximum": 10
}
},
"id": 17,
"allergens": [
{
"id": 15,
"name": "Nuts"
},
{
"id": 10,
"name": "Fish"
},
{
"id": 16,
"name": "Peanut"
}
],
"category_id": 13,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Suscipit recusandae at in perferendis doloribus quis."
},
"description": {
"en": "Est recusandae quo vitae sit rerum laborum quisquam. Quia quam nesciunt aut aspernatur voluptas et dolores. Sunt consequatur perferendis reprehenderit praesentium ut incidunt."
},
"url": {
"en": "http://www.metz.net/omnis-et-qui-nesciunt-explicabo-illo.html"
}
}
}
],
"shops": [
{
"name": "Wyatt Bauch",
"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,
"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": 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
}
},
{
"name": "Mr. Price Hill I",
"active": false,
"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": 19,
"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": "Josephine Hamill",
"active": false,
"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": 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": true
}
}
],
"id": 12,
"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": "Id atque nam quam maiores et id dolores nobis sunt quo."
},
"description": {
"en": "Eos eos asperiores tenetur earum voluptas et amet. Qui quis at qui voluptates ratione sed. A dignissimos qui omnis fugiat."
},
"url": {
"en": "http://pagac.com/nam-quam-molestiae-qui-deserunt-ducimus-impedit"
}
}
}