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.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 685
{
"name": "Mariah Blick",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": true,
"only_order_in_store": false,
"shop_ids": [
19,
18,
18
],
"seo": {
"title": {
"en": "Ad saepe incidunt architecto vel culpa quo vel eum a nesciunt."
},
"description": {
"en": "Pariatur et debitis iste nobis. Et animi veniam eos officia velit quam ut est. Deserunt porro explicabo sint quia sapiente harum."
},
"url": {
"en": "http://mcdermott.com/"
}
},
"product_ids": [
11,
12,
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: 12997
{
"name": "Pauline Kreiger",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": true,
"only_order_in_store": true,
"products": [
{
"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": 11,
"maximum": 10,
"maximum_day": 11,
"maximum_week": 14
},
"weight": {
"minimum": 15,
"maximum": 10,
"maximum_day": 10,
"maximum_week": 19,
"suggested": 11
},
"persons": {
"minimum": 13,
"maximum": 10
}
},
"id": 15,
"allergens": [
{
"id": 17,
"name": "Fish"
},
{
"id": 12,
"name": "Egg"
},
{
"id": 10,
"name": "Milk"
}
],
"category_id": 19,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Est eveniet enim fuga amet mollitia dolorum."
},
"description": {
"en": "Architecto ea dolores ipsum facilis odit illum. Maiores ad voluptas officia fugit. Quod ad expedita sint sequi quis sint eum neque."
},
"url": {
"en": "https://crist.org/consequuntur-quidem-eum-et-qui-voluptatem.html"
}
}
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"active": false,
"only_order_in_store": false,
"price_type": "PER_UNIT",
"price": 12,
"target_price": false,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 13,
"maximum": 11,
"maximum_day": 12,
"maximum_week": 16
},
"weight": {
"minimum": 14,
"maximum": 11,
"maximum_day": 13,
"maximum_week": 17,
"suggested": 13
},
"persons": {
"minimum": 17,
"maximum": 18
}
},
"id": 10,
"allergens": [
{
"id": 10,
"name": "Mustard"
},
{
"id": 11,
"name": "Sulphite"
},
{
"id": 15,
"name": "Soy"
}
],
"category_id": 10,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Qui perspiciatis est dolorum ut aut."
},
"description": {
"en": "Unde delectus tempore et qui et. Reiciendis nobis quasi quasi et incidunt deleniti. Et atque enim consequuntur."
},
"url": {
"en": "http://www.marquardt.com/odio-delectus-officiis-sint-est-dolor"
}
}
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"active": false,
"only_order_in_store": true,
"price_type": "PER_UNIT",
"price": 13,
"target_price": false,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 11,
"maximum": 12,
"maximum_day": 15,
"maximum_week": 13
},
"weight": {
"minimum": 13,
"maximum": 13,
"maximum_day": 12,
"maximum_week": 11,
"suggested": 19
},
"persons": {
"minimum": 10,
"maximum": 14
}
},
"id": 17,
"allergens": [
{
"id": 11,
"name": "Crustaceans"
},
{
"id": 19,
"name": "Celery"
},
{
"id": 15,
"name": "Soy"
}
],
"category_id": 11,
"price_look_up_code": "...",
"code": "...",
"seo": {
"title": {
"en": "Repellat quisquam suscipit quia sunt molestiae."
},
"description": {
"en": "Quasi iure dolore et ut dolor sed. Rem maxime occaecati quaerat. Quidem et illum est hic. A itaque nostrum nemo."
},
"url": {
"en": "http://willms.com/sunt-beatae-et-accusantium-nulla-eum-facilis-aut-ut"
}
}
}
],
"shops": [
{
"name": "Antone Kuphal",
"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": 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": false
}
},
{
"name": "Ms. Yazmin Wehner",
"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": 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": 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": false
}
},
{
"name": "Hassie Daugherty",
"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": 17,
"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": 13,
"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": "Molestiae ut sed consequatur iure error."
},
"description": {
"en": "Eum eligendi necessitatibus est odio asperiores similique. Quibusdam nihil delectus odit id odio ut enim."
},
"url": {
"en": "http://www.konopelski.com/"
}
}
}