POST /company/products/@id/photo
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 product you want to upload a photo 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/products/18/photo HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.9.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 |
---|---|---|
resolutions | [Resolution] | Array of Resolution |
file_id | Int? | Nullable. An integer value |
white_background | Bool | Optional. A boolean value |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 424
{
"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
}
],
"file_id": 19,
"white_background": false
}