Upload an attachment for a CartItem

POST /checkout/upload

Some option sets allow users to upload a picture. E.g. this is usefull when a merchant wants to allow customers to upload a picture for a cake topping. With this endpoint, you can upload a picture and save the CartUpload object to the cart in your app. File uploads will get removed automatically over time if the order has not been placed.


File upload

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
files Multiple files allowed by adding the [] at the end of the key name.

Example request 1

POST /checkout/upload HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: multipart/form-data;boundary="boundary"

Content-Disposition: form-data; name="multiple"; filename="test.png"
Content-Type: image/png

...<Binary file here depending on Content-Transfer-Encoding field>...


Array of CartUpload: [CartUpload]


Field Type Description
id Int An integer value
url URL An URL field starting with http:// or https://

Example response 1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 206

        "id": 19,
        "url": "https://example.com"
        "id": 17,
        "url": "https://example.com"
        "id": 15,
        "url": "https://example.com"
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.5.0 stable