Update an order

PATCH /company/orders/@id

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
id Int The ID of the order you want to update

Body

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

Field Type Description
id Int Id of the product
shop_id Int Id of the shop where this order has been placed
company_id Int Id of the company of the shop where this order has been placed
status String String enumarion of 'PENDING', 'HAS_READ', 'APPROVED', 'DECLINED', 'REMOVED', 'DELETED_BY_SHOP', 'COLLECTED'
order_nr Int Unique number on a yearly basis and per shop. Visible for the shop and consumers.
prices CartPrices Prices
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'
checkout OrderCheckout
products [CartItem.company] A list of all the products that have been ordered. Please note that the product data (prices, name, options...) can differ from the current product data because the data of products are captured at the time of placing the order to prevent product changes to affect existing orders.
invoice Checkout.Company? Nullable. When the consumer requested an invoice, this value will contain all the invoice details.
isop Checkout.ISOP? Nullable. When this order has been placed with the ISOP module, it will contain all the isop details.
consumer company.Consumer? Nullable. Contains some information about the user that placed the order. It may not be available when the data had to be removed for GDPR compliance.
created_at Timestamp Time when the order was created, measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

Example request 1

PATCH /company/orders/18 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: 1987
{
    "id": 12,
    "shop_id": 12,
    "company_id": 16,
    "status": "PENDING",
    "order_nr": 10,
    "prices": {
        "price": {
            "value": 11,
            "currency": "EUR"
        },
        "discount": {
            "value": 10,
            "currency": "EUR"
        },
        "warranty": {
            "value": 15,
            "currency": "EUR"
        },
        "delivery_cost": {
            "value": 16,
            "currency": "EUR"
        },
        "invoice_cost": {
            "value": 15,
            "currency": "EUR"
        },
        "sms_cost": {
            "value": 11,
            "currency": "EUR"
        },
        "transaction_cost": {
            "value": 19,
            "currency": "EUR"
        },
        "price_to_pay": {
            "value": 18,
            "currency": "EUR"
        },
        "price_with_discount": {
            "value": 13,
            "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
    },
    "products": [
        [],
        [],
        []
    ],
    "invoice": {
        "name": "...",
        "vat": "BE0123456789",
        "address": {
            "street": "Sint-Denijslaan",
            "nr": "96",
            "zipcode": "9000",
            "city": "Gent",
            "country": "BE"
        }
    },
    "isop": {
        "origin": "in-store",
        "customer_id": 15,
        "employee_id": 16
    },
    "consumer": {
        "email": "example@domain.com",
        "firstname": "...",
        "lastname": "...",
        "phone": "+32 475 00 00 00"
    },
    "created_at": 1629198226
}

Response

Field Type Description
id Int Id of the product
shop_id Int Id of the shop where this order has been placed
company_id Int Id of the company of the shop where this order has been placed
status String String enumarion of 'PENDING', 'HAS_READ', 'APPROVED', 'DECLINED', 'REMOVED', 'DELETED_BY_SHOP', 'COLLECTED'
order_nr Int Unique number on a yearly basis and per shop. Visible for the shop and consumers.
prices CartPrices Prices
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'
checkout OrderCheckout
products [CartItem.company] A list of all the products that have been ordered. Please note that the product data (prices, name, options...) can differ from the current product data because the data of products are captured at the time of placing the order to prevent product changes to affect existing orders.
invoice Checkout.Company? Nullable. When the consumer requested an invoice, this value will contain all the invoice details.
isop Checkout.ISOP? Nullable. When this order has been placed with the ISOP module, it will contain all the isop details.
consumer company.Consumer? Nullable. Contains some information about the user that placed the order. It may not be available when the data had to be removed for GDPR compliance.
created_at Timestamp Time when the order was created, measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

Example response 1

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

{
    "id": 13,
    "shop_id": 12,
    "company_id": 14,
    "status": "PENDING",
    "order_nr": 16,
    "prices": {
        "price": {
            "value": 18,
            "currency": "EUR"
        },
        "discount": {
            "value": 17,
            "currency": "EUR"
        },
        "warranty": {
            "value": 14,
            "currency": "EUR"
        },
        "delivery_cost": {
            "value": 10,
            "currency": "EUR"
        },
        "invoice_cost": {
            "value": 13,
            "currency": "EUR"
        },
        "sms_cost": {
            "value": 11,
            "currency": "EUR"
        },
        "transaction_cost": {
            "value": 18,
            "currency": "EUR"
        },
        "price_to_pay": {
            "value": 19,
            "currency": "EUR"
        },
        "price_with_discount": {
            "value": 14,
            "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
    },
    "products": [
        {
            "amount": 17,
            "persons": 14,
            "gram": 13,
            "comment": "...",
            "product": {
                "id": 18,
                "name": "...",
                "images": [
                    {
                        "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
                    },
                    {
                        "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
                    },
                    {
                        "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
                    }
                ],
                "price_type": "PER_UNIT",
                "target_price": true,
                "price": {
                    "value": 18,
                    "currency": "EUR"
                },
                "price_look_up_code": "...",
                "code": "..."
            },
            "product_price": {
                "id": 18,
                "name": "...",
                "price": {
                    "value": 10,
                    "currency": "EUR"
                },
                "price_look_up_code": "...",
                "code": "..."
            },
            "calculated_prices": {
                "unit_price": {
                    "value": 11,
                    "currency": "EUR"
                },
                "price": {
                    "value": 13,
                    "currency": "EUR"
                }
            },
            "discount_prices": {
                "unit_price": {
                    "value": 15,
                    "currency": "EUR"
                },
                "price": {
                    "value": 18,
                    "currency": "EUR"
                }
            },
            "amount_free": 13,
            "options": [
                {
                    "option": {
                        "id": 19,
                        "name": "...",
                        "price_change": {
                            "value": 19,
                            "currency": "EUR"
                        },
                        "image": {
                            "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": true
                        },
                        "require_image": true,
                        "code": "...",
                        "optionset": {
                            "id": 17,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 15,
                        "url": "https://example.com"
                    }
                },
                {
                    "option": {
                        "id": 10,
                        "name": "...",
                        "price_change": {
                            "value": 10,
                            "currency": "EUR"
                        },
                        "image": {
                            "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": true
                        },
                        "require_image": true,
                        "code": "...",
                        "optionset": {
                            "id": 15,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 15,
                        "url": "https://example.com"
                    }
                },
                {
                    "option": {
                        "id": 19,
                        "name": "...",
                        "price_change": {
                            "value": 16,
                            "currency": "EUR"
                        },
                        "image": {
                            "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
                        },
                        "require_image": true,
                        "code": "...",
                        "optionset": {
                            "id": 10,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 15,
                        "url": "https://example.com"
                    }
                }
            ]
        },
        {
            "amount": 14,
            "persons": 19,
            "gram": 11,
            "comment": "...",
            "product": {
                "id": 19,
                "name": "...",
                "images": [
                    {
                        "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
                    },
                    {
                        "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": true
                    },
                    {
                        "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
                    }
                ],
                "price_type": "PER_UNIT",
                "target_price": false,
                "price": {
                    "value": 15,
                    "currency": "EUR"
                },
                "price_look_up_code": "...",
                "code": "..."
            },
            "product_price": {
                "id": 10,
                "name": "...",
                "price": {
                    "value": 15,
                    "currency": "EUR"
                },
                "price_look_up_code": "...",
                "code": "..."
            },
            "calculated_prices": {
                "unit_price": {
                    "value": 15,
                    "currency": "EUR"
                },
                "price": {
                    "value": 14,
                    "currency": "EUR"
                }
            },
            "discount_prices": {
                "unit_price": {
                    "value": 16,
                    "currency": "EUR"
                },
                "price": {
                    "value": 10,
                    "currency": "EUR"
                }
            },
            "amount_free": 11,
            "options": [
                {
                    "option": {
                        "id": 16,
                        "name": "...",
                        "price_change": {
                            "value": 19,
                            "currency": "EUR"
                        },
                        "image": {
                            "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
                        },
                        "require_image": false,
                        "code": "...",
                        "optionset": {
                            "id": 10,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 17,
                        "url": "https://example.com"
                    }
                },
                {
                    "option": {
                        "id": 17,
                        "name": "...",
                        "price_change": {
                            "value": 18,
                            "currency": "EUR"
                        },
                        "image": {
                            "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
                        },
                        "require_image": false,
                        "code": "...",
                        "optionset": {
                            "id": 11,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 18,
                        "url": "https://example.com"
                    }
                },
                {
                    "option": {
                        "id": 12,
                        "name": "...",
                        "price_change": {
                            "value": 16,
                            "currency": "EUR"
                        },
                        "image": {
                            "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
                        },
                        "require_image": true,
                        "code": "...",
                        "optionset": {
                            "id": 12,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 18,
                        "url": "https://example.com"
                    }
                }
            ]
        },
        {
            "amount": 14,
            "persons": 10,
            "gram": 18,
            "comment": "...",
            "product": {
                "id": 13,
                "name": "...",
                "images": [
                    {
                        "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
                    },
                    {
                        "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": true
                    },
                    {
                        "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
                    }
                ],
                "price_type": "PER_UNIT",
                "target_price": false,
                "price": {
                    "value": 18,
                    "currency": "EUR"
                },
                "price_look_up_code": "...",
                "code": "..."
            },
            "product_price": {
                "id": 11,
                "name": "...",
                "price": {
                    "value": 16,
                    "currency": "EUR"
                },
                "price_look_up_code": "...",
                "code": "..."
            },
            "calculated_prices": {
                "unit_price": {
                    "value": 16,
                    "currency": "EUR"
                },
                "price": {
                    "value": 18,
                    "currency": "EUR"
                }
            },
            "discount_prices": {
                "unit_price": {
                    "value": 18,
                    "currency": "EUR"
                },
                "price": {
                    "value": 15,
                    "currency": "EUR"
                }
            },
            "amount_free": 14,
            "options": [
                {
                    "option": {
                        "id": 16,
                        "name": "...",
                        "price_change": {
                            "value": 17,
                            "currency": "EUR"
                        },
                        "image": {
                            "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": true
                        },
                        "require_image": true,
                        "code": "...",
                        "optionset": {
                            "id": 16,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 11,
                        "url": "https://example.com"
                    }
                },
                {
                    "option": {
                        "id": 19,
                        "name": "...",
                        "price_change": {
                            "value": 11,
                            "currency": "EUR"
                        },
                        "image": {
                            "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
                        },
                        "require_image": false,
                        "code": "...",
                        "optionset": {
                            "id": 11,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 18,
                        "url": "https://example.com"
                    }
                },
                {
                    "option": {
                        "id": 12,
                        "name": "...",
                        "price_change": {
                            "value": 15,
                            "currency": "EUR"
                        },
                        "image": {
                            "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": true
                        },
                        "require_image": false,
                        "code": "...",
                        "optionset": {
                            "id": 12,
                            "name": "...",
                            "code": "..."
                        }
                    },
                    "upload": {
                        "id": 10,
                        "url": "https://example.com"
                    }
                }
            ]
        }
    ],
    "invoice": {
        "name": "...",
        "vat": "BE0123456789",
        "address": {
            "street": "Sint-Denijslaan",
            "nr": "96",
            "zipcode": "9000",
            "city": "Gent",
            "country": "BE"
        }
    },
    "isop": {
        "origin": "in-store",
        "customer_id": 19,
        "employee_id": 14
    },
    "consumer": {
        "email": "example@domain.com",
        "firstname": "...",
        "lastname": "...",
        "phone": "+32 475 00 00 00"
    },
    "created_at": 1629198226
}
Version update available Please adjust your integration to the latest stable version (1.6.0)
1.5.0 stable