POST /company/categories/@id/banner
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 ID of the category you want to upload a banner for |
This endpoint requires uploaded files in the HTTP request. You can check the examples on the right for more information or read more about this on MDN.
Key | Description |
---|---|
file |
Upload a single file |
POST /company/categories/17/banner HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.8.0
Accept-Language: en-US,en;q=0.5
Content-Type: multipart/form-data;boundary="boundary"
--boundary
Content-Disposition: form-data; name="single"; filename="test.png"
Content-Type: image/png
...<Binary file here depending on Content-Transfer-Encoding field>...
--boundary--
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 |
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. |
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: 1186
{
"name": "Danial Rice",
"description": {
"nl": "...",
"en": "...",
"fr": "..."
},
"active": false,
"only_order_in_store": true,
"code": "...",
"id": 11,
"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
},
"seo": {
"title": {
"en": "Suscipit commodi aliquam aut voluptas unde quis ut labore ipsum ea."
},
"description": {
"en": "At corrupti est ullam nobis dolores soluta officiis. Harum nisi laboriosam aut cupiditate ut. Quia ullam libero necessitatibus et. Delectus reprehenderit rerum qui quibusdam ipsa."
},
"url": {
"en": "http://www.gottlieb.com/dignissimos-commodi-non-iure-deserunt"
}
}
}