POST /checkout/order
This endpoint requires authentication.
Header | Value |
---|---|
Authorization | Set the value to Bearer + + access_token |
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', 'carte_bleue', 'paypal', 'eps_uberweisung', 'apple_pay', 'google_pay', 'payconiq', 'monizze', 'edenred', 'webpay', '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', 'redsys_bizum', 'sibs_id' |
return_url | URL | An URL field starting with http:// or https:// |
POST /checkout/order 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: 4948
{
"cart": [
{
"amount": 17,
"persons": 19,
"gram": 12,
"comment": "...",
"product_id": 19,
"product_price_id": 10,
"shop_id": 10,
"option_ids": [
14,
19,
16
],
"uploads": [
{
"upload": {
"id": 18,
"url": "https://example.com"
},
"optionset_id": 14
},
{
"upload": {
"id": 11,
"url": "https://example.com"
},
"optionset_id": 18
},
{
"upload": {
"id": 18,
"url": "https://example.com"
},
"optionset_id": 12
}
],
"code": "..."
},
{
"amount": 10,
"persons": 18,
"gram": 17,
"comment": "...",
"product_id": 10,
"product_price_id": 13,
"shop_id": 11,
"option_ids": [
10,
17,
15
],
"uploads": [
{
"upload": {
"id": 18,
"url": "https://example.com"
},
"optionset_id": 12
},
{
"upload": {
"id": 11,
"url": "https://example.com"
},
"optionset_id": 15
},
{
"upload": {
"id": 11,
"url": "https://example.com"
},
"optionset_id": 16
}
],
"code": "..."
},
{
"amount": 16,
"persons": 17,
"gram": 15,
"comment": "...",
"product_id": 17,
"product_price_id": 17,
"shop_id": 14,
"option_ids": [
18,
16,
18
],
"uploads": [
{
"upload": {
"id": 17,
"url": "https://example.com"
},
"optionset_id": 17
},
{
"upload": {
"id": 13,
"url": "https://example.com"
},
"optionset_id": 11
},
{
"upload": {
"id": 18,
"url": "https://example.com"
},
"optionset_id": 12
}
],
"code": "..."
}
],
"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": 19,
"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": 15,
"employee_id": 16
},
"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": true
},
"coupons": [
{
"code": "..."
},
{
"code": "..."
},
{
"code": "..."
}
]
},
"payment_method": "point_of_sale",
"return_url": "https://example.com"
}
A dictionary with fields
Field | Type | Description |
---|---|---|
order_group | OrderGroup | |
payment_url | URL? | Nullable. An URL field starting with http:// or https:// |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 6227
{
"order_group": {
"id": 18,
"orders": [
{
"id": 13,
"status": "PENDING",
"valid": false,
"order_nr": 19,
"prices": {
"price": 15,
"discount": 11,
"warranty": 11,
"delivery_cost": 16,
"invoice_cost": 18,
"sms_cost": 10,
"transaction_cost": 11,
"price_to_pay": 15,
"price_with_discount": 15
},
"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": 11
},
"shop": {
"id": 11,
"name": "Dr. Novella Terry II",
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
}
},
"created_at": "2019-01-31 12:00:00",
"joyn": {
"points": 16,
"collect_url": "https://example.com",
"qr_code_url": "https://example.com"
},
"payment_status": "pending"
},
{
"id": 12,
"status": "PENDING",
"valid": true,
"order_nr": 10,
"prices": {
"price": 16,
"discount": 19,
"warranty": 18,
"delivery_cost": 12,
"invoice_cost": 13,
"sms_cost": 18,
"transaction_cost": 12,
"price_to_pay": 11,
"price_with_discount": 19
},
"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": 11
},
"shop": {
"id": 14,
"name": "Ms. Isabel Hill I",
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
}
},
"created_at": "2019-01-31 12:00:00",
"joyn": {
"points": 13,
"collect_url": "https://example.com",
"qr_code_url": "https://example.com"
},
"payment_status": "pending"
},
{
"id": 18,
"status": "PENDING",
"valid": false,
"order_nr": 11,
"prices": {
"price": 15,
"discount": 10,
"warranty": 16,
"delivery_cost": 15,
"invoice_cost": 11,
"sms_cost": 17,
"transaction_cost": 11,
"price_to_pay": 16,
"price_with_discount": 15
},
"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": 17
},
"shop": {
"id": 11,
"name": "Mireya Howe DDS",
"address": {
"street": "Sint-Denijslaan",
"nr": "96",
"zipcode": "9000",
"city": "Gent",
"country": "BE",
"position": {
"latitude": 1.54361,
"longitude": 0.45645
}
}
},
"created_at": "2019-01-31 12:00:00",
"joyn": {
"points": 15,
"collect_url": "https://example.com",
"qr_code_url": "https://example.com"
},
"payment_status": "pending"
}
]
},
"payment_url": "https://example.com"
}