Update an order status

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_payment_wall', 'payu_sp_pbl', 'payu_sp_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 Update order status

PATCH /company/orders/85 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 1b2d52c9fb399f0a4d776127fc90b429aebe88ae551b232cdb80d8dd7509ed3d4002b0134e68d02600834b40aad2b8670869abb47401ace135ded2f9e55715cd9ec7ed9ca464e5a30eb280886f27c2c23800aa175588846f8d29dc19950ec77586cd7756
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 28
{
    "status": "DECLINED"
}

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_payment_wall', 'payu_sp_pbl', 'payu_sp_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 Update order status

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

{
    "id": 85,
    "status": "DECLINED",
    "order_nr": 36,
    "prices": {
        "price": {
            "value": 8727,
            "currency": "EUR"
        },
        "discount": {
            "value": 0,
            "currency": "EUR"
        },
        "warranty": {
            "value": 0,
            "currency": "EUR"
        },
        "delivery_cost": {
            "value": 0,
            "currency": "EUR"
        },
        "invoice_cost": {
            "value": 0,
            "currency": "EUR"
        },
        "sms_cost": {
            "value": 0,
            "currency": "EUR"
        },
        "transaction_cost": {
            "value": 0,
            "currency": "EUR"
        },
        "price_to_pay": {
            "value": 8727,
            "currency": "EUR"
        }
    },
    "payment_method": "payu_brazil_visa",
    "checkout": {
        "method": "takeout",
        "date": "2020-09-17",
        "time": "18:29"
    },
    "created_at": 1592307646,
    "shop_id": 217,
    "company_id": 200,
    "invoice": null,
    "isop": null,
    "consumer": {
        "email": "nboulanger4695236@example.org",
        "firstname": "Warre",
        "lastname": "Bodart",
        "phone": "+32479567345"
    },
    "products": [
        {
            "persons": 0,
            "amount": 1,
            "gram": 0,
            "comment": "",
            "product": {
                "id": 553,
                "name": "Boerenbrood klein",
                "price": {
                    "value": 2420,
                    "currency": "EUR"
                },
                "images": [],
                "price_type": "MULTIPLE_CHOICE",
                "target_price": false,
                "price_look_up_code": "50375",
                "code": "136689"
            },
            "options": [
                {
                    "option": {
                        "id": 1854,
                        "name": "No thank you",
                        "price_change": {
                            "value": 759,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 528,
                            "name": "Do you want your bread sliced?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1856,
                        "name": "Yes please",
                        "price_change": {
                            "value": 791,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 529,
                            "name": "Do you want a picture on your cake?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1861,
                        "name": "Yes please",
                        "price_change": {
                            "value": 193,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 530,
                            "name": "Extra baked?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1864,
                        "name": "No",
                        "price_change": {
                            "value": 160,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 531,
                            "name": "Do you want a bag?",
                            "code": null
                        }
                    },
                    "upload": null
                }
            ],
            "product_price": {
                "id": 338,
                "name": "4 persons",
                "price": {
                    "value": 24,
                    "currency": "EUR"
                },
                "price_look_up_code": "27",
                "code": "41"
            },
            "calculated_prices": {
                "unit_price": {
                    "value": 1927,
                    "currency": "EUR"
                },
                "price": {
                    "value": 1927,
                    "currency": "EUR"
                }
            },
            "discount_prices": null,
            "amount_free": 0
        },
        {
            "persons": 0,
            "amount": 1,
            "gram": 100,
            "comment": "",
            "product": {
                "id": 554,
                "name": "Tijgerpistolet wit ",
                "price": {
                    "value": 4807,
                    "currency": "EUR"
                },
                "images": [],
                "price_type": "PER_KILOGRAM",
                "target_price": true,
                "price_look_up_code": null,
                "code": "828260"
            },
            "options": [
                {
                    "option": {
                        "id": 1854,
                        "name": "No thank you",
                        "price_change": {
                            "value": 759,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 528,
                            "name": "Do you want your bread sliced?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1869,
                        "name": "Yes please",
                        "price_change": {
                            "value": 835,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 532,
                            "name": "Do you want a bag?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1871,
                        "name": "No",
                        "price_change": {
                            "value": 630,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 533,
                            "name": "Extra baked?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1874,
                        "name": "Yes",
                        "price_change": {
                            "value": 257,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 534,
                            "name": "Do you want a picture on your cake?",
                            "code": null
                        }
                    },
                    "upload": null
                }
            ],
            "product_price": null,
            "calculated_prices": {
                "unit_price": {
                    "value": 4807,
                    "currency": "EUR"
                },
                "price": {
                    "value": 2962,
                    "currency": "EUR"
                }
            },
            "discount_prices": null,
            "amount_free": 0
        },
        {
            "persons": 0,
            "amount": 1,
            "gram": 0,
            "comment": "",
            "product": {
                "id": 555,
                "name": "Plastic zakje 6 x malse sandwich",
                "price": {
                    "value": 2716,
                    "currency": "EUR"
                },
                "images": [],
                "price_type": "PER_UNIT",
                "target_price": false,
                "price_look_up_code": null,
                "code": "578568"
            },
            "options": [
                {
                    "option": {
                        "id": 1856,
                        "name": "Yes please",
                        "price_change": {
                            "value": 791,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 529,
                            "name": "Do you want a picture on your cake?",
                            "code": null
                        }
                    },
                    "upload": null
                },
                {
                    "option": {
                        "id": 1859,
                        "name": "No",
                        "price_change": {
                            "value": 331,
                            "currency": "EUR"
                        },
                        "image": null,
                        "require_image": false,
                        "code": null,
                        "optionset": {
                            "id": 530,
                            "name": "Extra baked?",
                            "code": null
                        }
                    },
                    "upload": null
                }
            ],
            "product_price": null,
            "calculated_prices": {
                "unit_price": {
                    "value": 3838,
                    "currency": "EUR"
                },
                "price": {
                    "value": 3838,
                    "currency": "EUR"
                }
            },
            "discount_prices": null,
            "amount_free": 0
        }
    ]
}
1.5.0 stable