Place an order

POST /checkout/order

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Body

Pass the following properties via application/json or form encoding in the body of the request.

A dictionary with fields

Field Type Description
cart [CartItem.cart] Array of CartItem.cart
checkout Checkout.Checkout
payment_method String String enumarion of 'point_of_sale', 'paid_in_shop', 'bank_transfer', 'ideal', 'bancontact', 'sofort', 'giropay', 'creditcard', 'cartes_bancaires', 'paypal', 'eps_uberweisung', 'payconiq', 'monizze', 'edenred', 'webpay', 'credomatic', 'satispay', 'stripe_card_visa_mc', 'stripe_card_amex', 'stripe_apple_pay', 'stripe_google_pay', 'payu_romania_visa', 'payu_romania_mc', 'payu_romania_visa_electron', 'payu_romania_maestro', 'payu_brazil_amex', 'payu_brazil_boleto_bancario', 'payu_brazil_diners', 'payu_brazil_elo', 'payu_brazil_hipercard', 'payu_brazil_mc', 'payu_brazil_visa', 'payu_sp_maestro', 'payu_sp_mc', 'payu_sp_pbl', 'payu_sp_visa', 'payu_sp_blik', 'payu_iyzico_amex', 'payu_iyzico_mc', 'payu_iyzico_troy', 'payu_iyzico_visa', 'pesopay_gcash', 'pesopay_visa', 'pesopay_mc'
return_url URL An URL field starting with http:// or https://

Example request 1

POST /checkout/order 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: 3590
{
    "cart": [
        {
            "amount": 14,
            "persons": 16,
            "gram": 18,
            "comment": "...",
            "product_id": 18,
            "product_price_id": 17,
            "shop_id": 12,
            "options": [
                {
                    "option_id": 15,
                    "upload_id": 11
                },
                {
                    "option_id": 15,
                    "upload_id": 16
                },
                {
                    "option_id": 15,
                    "upload_id": 15
                }
            ]
        },
        {
            "amount": 17,
            "persons": 17,
            "gram": 15,
            "comment": "...",
            "product_id": 15,
            "product_price_id": 19,
            "shop_id": 13,
            "options": [
                {
                    "option_id": 16,
                    "upload_id": 19
                },
                {
                    "option_id": 16,
                    "upload_id": 12
                },
                {
                    "option_id": 15,
                    "upload_id": 19
                }
            ]
        },
        {
            "amount": 17,
            "persons": 17,
            "gram": 17,
            "comment": "...",
            "product_id": 13,
            "product_price_id": 10,
            "shop_id": 15,
            "options": [
                {
                    "option_id": 11,
                    "upload_id": 13
                },
                {
                    "option_id": 19,
                    "upload_id": 14
                },
                {
                    "option_id": 14,
                    "upload_id": 15
                }
            ]
        }
    ],
    "checkout": {
        "method": "delivery",
        "delivery": {
            "date": "2019-01-31",
            "time": "12:00",
            "address": {
                "street": "Sint-Denijslaan",
                "nr": "96",
                "zipcode": "9000",
                "city": "Gent",
                "country": "BE"
            },
            "notes": "...",
            "end_time": "12:00"
        },
        "takeout": {
            "shops": {
                "...": {
                    "id": 13,
                    "date": "2019-01-31",
                    "time": "12:00"
                }
            }
        },
        "latch": {
            "latch_id": 12,
            "telephone": "+32 475 00 00 00",
            "date": "2019-01-31",
            "time": "12:00",
            "notification_method": "email"
        },
        "isop": {
            "origin": "in-store",
            "customer_id": 12,
            "employee_id": 14
        },
        "warranty": {
            "bank": "ING. Bank"
        },
        "invoice": {
            "company": {
                "name": "...",
                "vat": "BE0123456789",
                "address": {
                    "street": "Sint-Denijslaan",
                    "nr": "96",
                    "zipcode": "9000",
                    "city": "Gent",
                    "country": "BE"
                }
            }
        },
        "config": {
            "askInvoice": false,
            "askIsop": false
        },
        "coupons": [
            {
                "code": "..."
            },
            {
                "code": "..."
            },
            {
                "code": "..."
            }
        ]
    },
    "payment_method": "point_of_sale",
    "return_url": "https://example.com"
}

Response

A dictionary with fields

Field Type Description
order_group OrderGroup
payment_url URL? Nullable. 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: 9250

{
    "order_group": {
        "id": 12,
        "orders": [
            {
                "id": 14,
                "status": "PENDING",
                "valid": true,
                "order_nr": 16,
                "prices": {
                    "price": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "discount": {
                        "value": 18,
                        "currency": "EUR"
                    },
                    "warranty": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "delivery_cost": {
                        "value": 18,
                        "currency": "EUR"
                    },
                    "invoice_cost": {
                        "value": 11,
                        "currency": "EUR"
                    },
                    "sms_cost": {
                        "value": 18,
                        "currency": "EUR"
                    },
                    "transaction_cost": {
                        "value": 11,
                        "currency": "EUR"
                    },
                    "price_to_pay": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "price_with_discount": {
                        "value": 11,
                        "currency": "EUR"
                    }
                },
                "payment_method": "point_of_sale",
                "checkout": {
                    "method": "delivery",
                    "date": "2019-01-31",
                    "time": "12:00",
                    "end_time": "12:00",
                    "address": {
                        "street": "Sint-Denijslaan",
                        "nr": "96",
                        "zipcode": "9000",
                        "city": "Gent",
                        "country": "BE"
                    },
                    "notes": "...",
                    "name": "...",
                    "latch_id": 15
                },
                "shop": {
                    "id": 16,
                    "name": "Kayley Kovacek DDS",
                    "address": {
                        "street": "Sint-Denijslaan",
                        "nr": "96",
                        "zipcode": "9000",
                        "city": "Gent",
                        "country": "BE",
                        "position": {
                            "latitude": 1.54361,
                            "longitude": 0.45645
                        }
                    },
                    "allow_comments": true,
                    "currency": "EUR"
                },
                "created_at": 1629198223,
                "joyn": {
                    "points": 15,
                    "collect_url": "https://example.com",
                    "qr_code_url": "https://example.com"
                },
                "payment_status": "pending",
                "currency": "EUR"
            },
            {
                "id": 15,
                "status": "PENDING",
                "valid": true,
                "order_nr": 17,
                "prices": {
                    "price": {
                        "value": 12,
                        "currency": "EUR"
                    },
                    "discount": {
                        "value": 14,
                        "currency": "EUR"
                    },
                    "warranty": {
                        "value": 18,
                        "currency": "EUR"
                    },
                    "delivery_cost": {
                        "value": 18,
                        "currency": "EUR"
                    },
                    "invoice_cost": {
                        "value": 10,
                        "currency": "EUR"
                    },
                    "sms_cost": {
                        "value": 12,
                        "currency": "EUR"
                    },
                    "transaction_cost": {
                        "value": 14,
                        "currency": "EUR"
                    },
                    "price_to_pay": {
                        "value": 16,
                        "currency": "EUR"
                    },
                    "price_with_discount": {
                        "value": 11,
                        "currency": "EUR"
                    }
                },
                "payment_method": "point_of_sale",
                "checkout": {
                    "method": "delivery",
                    "date": "2019-01-31",
                    "time": "12:00",
                    "end_time": "12:00",
                    "address": {
                        "street": "Sint-Denijslaan",
                        "nr": "96",
                        "zipcode": "9000",
                        "city": "Gent",
                        "country": "BE"
                    },
                    "notes": "...",
                    "name": "...",
                    "latch_id": 18
                },
                "shop": {
                    "id": 11,
                    "name": "Bonnie Rutherford",
                    "address": {
                        "street": "Sint-Denijslaan",
                        "nr": "96",
                        "zipcode": "9000",
                        "city": "Gent",
                        "country": "BE",
                        "position": {
                            "latitude": 1.54361,
                            "longitude": 0.45645
                        }
                    },
                    "allow_comments": true,
                    "currency": "EUR"
                },
                "created_at": 1629198223,
                "joyn": {
                    "points": 17,
                    "collect_url": "https://example.com",
                    "qr_code_url": "https://example.com"
                },
                "payment_status": "pending",
                "currency": "EUR"
            },
            {
                "id": 17,
                "status": "PENDING",
                "valid": true,
                "order_nr": 14,
                "prices": {
                    "price": {
                        "value": 13,
                        "currency": "EUR"
                    },
                    "discount": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "warranty": {
                        "value": 12,
                        "currency": "EUR"
                    },
                    "delivery_cost": {
                        "value": 16,
                        "currency": "EUR"
                    },
                    "invoice_cost": {
                        "value": 13,
                        "currency": "EUR"
                    },
                    "sms_cost": {
                        "value": 19,
                        "currency": "EUR"
                    },
                    "transaction_cost": {
                        "value": 10,
                        "currency": "EUR"
                    },
                    "price_to_pay": {
                        "value": 13,
                        "currency": "EUR"
                    },
                    "price_with_discount": {
                        "value": 15,
                        "currency": "EUR"
                    }
                },
                "payment_method": "point_of_sale",
                "checkout": {
                    "method": "delivery",
                    "date": "2019-01-31",
                    "time": "12:00",
                    "end_time": "12:00",
                    "address": {
                        "street": "Sint-Denijslaan",
                        "nr": "96",
                        "zipcode": "9000",
                        "city": "Gent",
                        "country": "BE"
                    },
                    "notes": "...",
                    "name": "...",
                    "latch_id": 19
                },
                "shop": {
                    "id": 19,
                    "name": "Ms. Karelle White IV",
                    "address": {
                        "street": "Sint-Denijslaan",
                        "nr": "96",
                        "zipcode": "9000",
                        "city": "Gent",
                        "country": "BE",
                        "position": {
                            "latitude": 1.54361,
                            "longitude": 0.45645
                        }
                    },
                    "allow_comments": false,
                    "currency": "EUR"
                },
                "created_at": 1629198223,
                "joyn": {
                    "points": 15,
                    "collect_url": "https://example.com",
                    "qr_code_url": "https://example.com"
                },
                "payment_status": "pending",
                "currency": "EUR"
            }
        ]
    },
    "payment_url": "https://example.com"
}
Version update available Please adjust your integration to the latest stable version (1.6.0)
1.5.0 stable