Get all orders

GET /orders

Return the orders of the user, paged per 15 orders. Sorted from new to old by default. You can filter the results. If you want to poll for new orders, you should use the future property:

The future object will only be available if it is possible that new orders will match your filtering criteria, when you use ascending sorting (not the default!), and if there are no more results left (next property is null, results may stil contain some orders).

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Query string (URL)

Append the querystring with following properties to the URL.

A dictionary with fields

Field Type Description
status String Optional. Only return orders with this status
created_after Timestamp Optional. Only return orders that were placed after (including) this timestamp. Do not use this for pagination as multiple orders might share the same created_at timestamp.
created_before Timestamp Optional. Only return orders that were placed before (including) this timestamp. You can use this together with created_after. Do not use this for pagination as multiple orders might share the same created_at timestamp.
before_id Int Optional. Only return orders created before (not including) the order with the given id. Before isn't the same as smaller, it might return IDs that are larger than the given id from orders that are validated before the given order id! Use for pagination.
after_id Int Optional. Only return orders created after (not including) the order with the given id. After isn't the same as larger, it might return IDs that are smaller than the given id from orders that are validated after the given order id! Use for pagination.
sort String Optional. Sort the results in ascending or descending (default) order by creation date (the date an order is paid or validated). Default is ascending.
company_id Int Optional. Only return orders placed in shops of this company. Using this will ignore the platform.

Example request 1 Get all orders

GET /orders HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer cc815a30b688fb64b700a3cb8d6aeb42ba94e69896b2f50141886e6da86e437c7a29314dac908a2b20a81d83f479ede98751f6cc0c2bf1cb8a22630ccf18be6330faa5fce40f8a97a6cdac8d5d14cf78bb97930f03f544e9a59d19b29a6bf03f5488bb6d
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 2 Get orders placed before a date

GET /orders?created_before=1546344060 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer cc815a30b688fb64b700a3cb8d6aeb42ba94e69896b2f50141886e6da86e437c7a29314dac908a2b20a81d83f479ede98751f6cc0c2bf1cb8a22630ccf18be6330faa5fce40f8a97a6cdac8d5d14cf78bb97930f03f544e9a59d19b29a6bf03f5488bb6d
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 3 Get all orders at a company

GET /orders?company_id=2035 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer cc815a30b688fb64b700a3cb8d6aeb42ba94e69896b2f50141886e6da86e437c7a29314dac908a2b20a81d83f479ede98751f6cc0c2bf1cb8a22630ccf18be6330faa5fce40f8a97a6cdac8d5d14cf78bb97930f03f544e9a59d19b29a6bf03f5488bb6d
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Example request 4 Get all orders after order

GET /orders?after_id=379657 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer cc815a30b688fb64b700a3cb8d6aeb42ba94e69896b2f50141886e6da86e437c7a29314dac908a2b20a81d83f479ede98751f6cc0c2bf1cb8a22630ccf18be6330faa5fce40f8a97a6cdac8d5d14cf78bb97930f03f544e9a59d19b29a6bf03f5488bb6d
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5

Response

Field Type Description
results [Order.simple] Array of Order.simple
next Dictionary? Nullable. Set when we have more results at this moment. It contains the query parameters you need to request the following results. Is null when there are no results left
future Dictionary? Nullable. When all the results have been returned (no next set), but there might be more results in the future, future contains the query parameters you should use to request new results in the future (e.g. in 15 minutes) to know if you have extra results without returning the same results again.

Example response 1 Get all orders

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

{
    "results": [
        {
            "id": 379658,
            "status": "DELETED_BY_SHOP",
            "valid": true,
            "order_nr": 4,
            "prices": {
                "price": {
                    "value": 8025,
                    "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": 8025,
                    "currency": "EUR"
                }
            },
            "payment_method": "creditcard",
            "checkout": {
                "method": "takeout",
                "date": "2019-11-19",
                "time": "16:47"
            },
            "created_at": 1546344120,
            "shop": {
                "id": 2093,
                "name": "Bakers Delight",
                "address": {
                    "street": "Meertweg",
                    "nr": "21",
                    "zipcode": "1730",
                    "city": "Blankenberge",
                    "country": "BE",
                    "position": {
                        "latitude": 51.260197,
                        "longitude": 4.402771
                    }
                },
                "allow_comments": true,
                "currency": "EUR"
            },
            "payment_status": null,
            "joyn": null,
            "currency": "EUR"
        },
        {
            "id": 379657,
            "status": "COLLECTED",
            "valid": true,
            "order_nr": 3,
            "prices": {
                "price": {
                    "value": 15224,
                    "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": 15224,
                    "currency": "EUR"
                }
            },
            "payment_method": "paid_in_shop",
            "checkout": {
                "method": "takeout",
                "date": "2021-09-11",
                "time": "07:58"
            },
            "created_at": 1546344000,
            "shop": {
                "id": 2090,
                "name": "The Dough Flow",
                "address": {
                    "street": "Lecocqsteeg",
                    "nr": "18",
                    "zipcode": "7730",
                    "city": "Zoutleeuw",
                    "country": "BE",
                    "position": {
                        "latitude": 50.8503396,
                        "longitude": 4.3517103
                    }
                },
                "allow_comments": true,
                "currency": "EUR"
            },
            "payment_status": null,
            "joyn": null,
            "currency": "EUR"
        }
    ],
    "next": null,
    "future": null
}

Example response 2 Get orders placed before a date

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

{
    "results": [
        {
            "id": 379657,
            "status": "COLLECTED",
            "valid": true,
            "order_nr": 3,
            "prices": {
                "price": {
                    "value": 15224,
                    "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": 15224,
                    "currency": "EUR"
                }
            },
            "payment_method": "paid_in_shop",
            "checkout": {
                "method": "takeout",
                "date": "2021-09-11",
                "time": "07:58"
            },
            "created_at": 1546344000,
            "shop": {
                "id": 2090,
                "name": "The Dough Flow",
                "address": {
                    "street": "Lecocqsteeg",
                    "nr": "18",
                    "zipcode": "7730",
                    "city": "Zoutleeuw",
                    "country": "BE",
                    "position": {
                        "latitude": 50.8503396,
                        "longitude": 4.3517103
                    }
                },
                "allow_comments": true,
                "currency": "EUR"
            },
            "payment_status": null,
            "joyn": null,
            "currency": "EUR"
        }
    ],
    "next": null,
    "future": null
}

Example response 3 Get all orders at a company

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

{
    "results": [
        {
            "id": 379658,
            "status": "DELETED_BY_SHOP",
            "valid": true,
            "order_nr": 4,
            "prices": {
                "price": {
                    "value": 8025,
                    "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": 8025,
                    "currency": "EUR"
                }
            },
            "payment_method": "creditcard",
            "checkout": {
                "method": "takeout",
                "date": "2019-11-19",
                "time": "16:47"
            },
            "created_at": 1546344120,
            "shop": {
                "id": 2093,
                "name": "Bakers Delight",
                "address": {
                    "street": "Meertweg",
                    "nr": "21",
                    "zipcode": "1730",
                    "city": "Blankenberge",
                    "country": "BE",
                    "position": {
                        "latitude": 51.260197,
                        "longitude": 4.402771
                    }
                },
                "allow_comments": true,
                "currency": "EUR"
            },
            "payment_status": null,
            "joyn": null,
            "currency": "EUR"
        }
    ],
    "next": null,
    "future": null
}

Example response 4 Get all orders after order

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

{
    "results": [
        {
            "id": 379658,
            "status": "DELETED_BY_SHOP",
            "valid": true,
            "order_nr": 4,
            "prices": {
                "price": {
                    "value": 8025,
                    "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": 8025,
                    "currency": "EUR"
                }
            },
            "payment_method": "creditcard",
            "checkout": {
                "method": "takeout",
                "date": "2019-11-19",
                "time": "16:47"
            },
            "created_at": 1546344120,
            "shop": {
                "id": 2093,
                "name": "Bakers Delight",
                "address": {
                    "street": "Meertweg",
                    "nr": "21",
                    "zipcode": "1730",
                    "city": "Blankenberge",
                    "country": "BE",
                    "position": {
                        "latitude": 51.260197,
                        "longitude": 4.402771
                    }
                },
                "allow_comments": true,
                "currency": "EUR"
            },
            "payment_status": null,
            "joyn": null,
            "currency": "EUR"
        }
    ],
    "next": null,
    "future": null
}
1.5.0 stable