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/11/categories HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 0.3.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 712
{
"name": "Prof. Sarina Lindgren",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": true,
"only_order_in_store": true,
"shop_ids": [
17,
17,
17
],
"seo": {
"title": {
"en": "Fuga sint reprehenderit officiis id modi dolore."
},
"description": {
"en": "Ea qui totam voluptatem dicta placeat repudiandae ex. Dolor alias exercitationem ut et quia. Et eos adipisci et."
},
"url": {
"en": "http://prohaska.org/provident-et-eos-qui-itaque-omnis-perspiciatis.html"
}
},
"product_ids": [
13,
17,
16
]
}
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: 13273
{
"name": "Nyah O'Keefe",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": true,
"products": [
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": true,
"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": 15,
"maximum": 18,
"maximum_day": 12,
"maximum_week": 14
},
"weight": {
"minimum": 15,
"maximum": 18,
"maximum_day": 13,
"maximum_week": 18,
"suggested": 10
},
"persons": {
"minimum": 10,
"maximum": 11
}
},
"id": 12,
"allergens": [
{
"id": 13,
"name": "Lupine"
},
{
"id": 14,
"name": "Lactose"
},
{
"id": 10,
"name": "Soy"
}
],
"category_id": 14,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Quae quibusdam minima voluptatem animi omnis ullam necessitatibus."
},
"description": {
"en": "Repudiandae quidem autem est molestiae sapiente facilis molestiae. Aliquam architecto accusantium quam unde et. Sint esse iste et a molestias aspernatur animi."
},
"url": {
"en": "https://www.jaskolski.com/cum-impedit-expedita-debitis"
}
},
"code": "..."
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"specialty": false,
"active": false,
"only_order_in_store": false,
"price_type": "PER_UNIT",
"price": 11,
"target_price": true,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 18,
"maximum": 11,
"maximum_day": 16,
"maximum_week": 17
},
"weight": {
"minimum": 14,
"maximum": 11,
"maximum_day": 13,
"maximum_week": 13,
"suggested": 18
},
"persons": {
"minimum": 16,
"maximum": 12
}
},
"id": 12,
"allergens": [
{
"id": 19,
"name": "Sulphite"
},
{
"id": 12,
"name": "Fish"
},
{
"id": 17,
"name": "Fish"
}
],
"category_id": 17,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Nulla numquam nesciunt quisquam cumque molestias porro delectus."
},
"description": {
"en": "Iusto delectus soluta repellat minus beatae. Sit perspiciatis nam aliquam quia. Ea accusantium vitae nisi veniam tenetur."
},
"url": {
"en": "http://www.carter.com/et-ut-veniam-autem-dolor-voluptatum-perspiciatis.html"
}
},
"code": "..."
},
{
"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": false,
"url_type": "none",
"url": "https://example.com",
"min_max": {
"amount": {
"minimum": 13,
"maximum": 14,
"maximum_day": 17,
"maximum_week": 10
},
"weight": {
"minimum": 12,
"maximum": 11,
"maximum_day": 15,
"maximum_week": 14,
"suggested": 15
},
"persons": {
"minimum": 10,
"maximum": 17
}
},
"id": 11,
"allergens": [
{
"id": 11,
"name": "Sesame"
},
{
"id": 11,
"name": "Peanut"
},
{
"id": 16,
"name": "Sesame"
}
],
"category_id": 10,
"price_look_up_code": "...",
"seo": {
"title": {
"en": "Ab beatae vitae a consequatur est eveniet inventore."
},
"description": {
"en": "Eos assumenda omnis et. Facilis tenetur illum officiis dolorem at deleniti veritatis. Consequatur dolorem reiciendis iure eius illum quam. Non labore quae fugit modi voluptatem aperiam quia."
},
"url": {
"en": "https://www.batz.info/laboriosam-totam-itaque-assumenda-unde-nihil-nesciunt-possimus"
}
},
"code": "..."
}
],
"shops": [
{
"name": "Lennie McCullough",
"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": false,
"id": 15,
"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": "Anabel Berge V",
"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": 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": "Richie Klocko MD",
"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": false,
"id": 13,
"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": 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
}
],
"white_background": true
},
"seo": {
"title": {
"en": "Nihil hic id laudantium molestiae quia autem eos natus."
},
"description": {
"en": "Sint quod fugiat accusantium quam reiciendis perspiciatis. Voluptas molestias ut quod voluptatem aut quis facere. Beatae qui repellat impedit sit et cum qui. Sed optio qui laudantium."
},
"url": {
"en": "http://schaefer.com/"
}
}
}