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.

Example request 1

GET /orders?status=PENDING&created_after=1657086111&created_before=1657086111&before_id=19&after_id=17&sort=ascending HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.0.0
Accept-Language: en-US,en;q=0.5

Response

Field Type Description
results [Order.simple] Array of Order.simple
next Dictionary? Nullable. The query parameters you need to request the following results. Is null when there are no results left

Example response 1

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

{
    "results": [
        {
            "id": 16,
            "status": "PENDING",
            "valid": true,
            "order_nr": 12,
            "prices": {
                "price": 13,
                "discount": 16,
                "warranty": 15,
                "delivery_cost": 12,
                "invoice_cost": 11,
                "sms_cost": 14,
                "transaction_cost": 15,
                "price_to_pay": 17,
                "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": 16
            },
            "shop": {
                "id": 14,
                "name": "Anabel Daniel",
                "address": {
                    "street": "Sint-Denijslaan",
                    "nr": "96",
                    "zipcode": "9000",
                    "city": "Gent",
                    "country": "BE",
                    "position": {
                        "latitude": 1.54361,
                        "longitude": 0.45645
                    }
                },
                "currency": "EUR"
            },
            "created_at": 1657086111,
            "joyn": {
                "points": 12,
                "collect_url": "https://example.com",
                "qr_code_url": "https://example.com"
            },
            "payment_status": "pending",
            "currency": "EUR"
        },
        {
            "id": 12,
            "status": "PENDING",
            "valid": false,
            "order_nr": 12,
            "prices": {
                "price": 11,
                "discount": 12,
                "warranty": 14,
                "delivery_cost": 19,
                "invoice_cost": 18,
                "sms_cost": 12,
                "transaction_cost": 12,
                "price_to_pay": 12,
                "price_with_discount": 13
            },
            "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": 16
            },
            "shop": {
                "id": 15,
                "name": "Chyna Bernhard",
                "address": {
                    "street": "Sint-Denijslaan",
                    "nr": "96",
                    "zipcode": "9000",
                    "city": "Gent",
                    "country": "BE",
                    "position": {
                        "latitude": 1.54361,
                        "longitude": 0.45645
                    }
                },
                "currency": "EUR"
            },
            "created_at": 1657086111,
            "joyn": {
                "points": 15,
                "collect_url": "https://example.com",
                "qr_code_url": "https://example.com"
            },
            "payment_status": "pending",
            "currency": "EUR"
        },
        {
            "id": 19,
            "status": "PENDING",
            "valid": true,
            "order_nr": 19,
            "prices": {
                "price": 10,
                "discount": 19,
                "warranty": 10,
                "delivery_cost": 17,
                "invoice_cost": 11,
                "sms_cost": 12,
                "transaction_cost": 16,
                "price_to_pay": 19,
                "price_with_discount": 17
            },
            "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": 13
            },
            "shop": {
                "id": 10,
                "name": "Santa Bernier",
                "address": {
                    "street": "Sint-Denijslaan",
                    "nr": "96",
                    "zipcode": "9000",
                    "city": "Gent",
                    "country": "BE",
                    "position": {
                        "latitude": 1.54361,
                        "longitude": 0.45645
                    }
                },
                "currency": "EUR"
            },
            "created_at": 1657086111,
            "joyn": {
                "points": 12,
                "collect_url": "https://example.com",
                "qr_code_url": "https://example.com"
            },
            "payment_status": "pending",
            "currency": "EUR"
        }
    ],
    "next": {
        "status": "PENDING",
        "created_after": 1657086111,
        "created_before": 1657086111,
        "before_id": 12,
        "after_id": 17,
        "sort": "ascending"
    }
}
Version update available Please adjust your integration to the latest stable version (1.9.0)
1.0.0 stable