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
before DateTime Optional. Return only orders that were placed before the given date in Europe/Brussels time.

Example request 1

GET /orders?before=2019-01-31+12%3A00%3A00 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 0.2.2
Accept-Language: en-US,en;q=0.5

Response

Array of Order.simple: [Order.simple]

Order.simple

Field Type Description
id Int Id of the product
status String String enumarion of 'PENDING', 'HAS_READ', 'APPROVED', 'DECLINED', 'REMOVED', 'DELETED_BY_SHOP', 'COLLECTED'
valid Bool Is true when the order is completed or paid and visible for the shop.
order_nr Int Unique number on a yearly basis and per shop. Visible for the shop and users. Only available for valid orders.
prices CartPrices Prices
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'
checkout OrderCheckout
shop Shop.simple
created_at DateTime Datetime string in Europe/Brussels for when the order was created.
joyn Joyn? Nullable. Contains the amount of points that can get saved with Joyn + a link to collect the points.
payment_status String? Nullable. String enumarion of 'pending', 'canceled', 'timeout', 'declined', 'refunded', 'paid'

Example response 1

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

[
    {
        "id": 19,
        "status": "PENDING",
        "valid": false,
        "order_nr": 10,
        "prices": {
            "price": 18,
            "discount": 12,
            "warranty": 15,
            "delivery_cost": 13,
            "invoice_cost": 10,
            "sms_cost": 19,
            "transaction_cost": 19,
            "price_to_pay": 19,
            "price_with_discount": 14
        },
        "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": "..."
        },
        "shop": {
            "id": 12,
            "name": "Davion Huels MD",
            "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"
    },
    {
        "id": 13,
        "status": "PENDING",
        "valid": true,
        "order_nr": 11,
        "prices": {
            "price": 18,
            "discount": 19,
            "warranty": 13,
            "delivery_cost": 11,
            "invoice_cost": 12,
            "sms_cost": 15,
            "transaction_cost": 10,
            "price_to_pay": 10,
            "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": "..."
        },
        "shop": {
            "id": 14,
            "name": "Dr. Mylene Gibson",
            "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": 10,
        "status": "PENDING",
        "valid": true,
        "order_nr": 13,
        "prices": {
            "price": 10,
            "discount": 19,
            "warranty": 12,
            "delivery_cost": 10,
            "invoice_cost": 13,
            "sms_cost": 10,
            "transaction_cost": 11,
            "price_to_pay": 13,
            "price_with_discount": 14
        },
        "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": "..."
        },
        "shop": {
            "id": 19,
            "name": "Sonya Kohler",
            "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": 19,
            "collect_url": "https://example.com",
            "qr_code_url": "https://example.com"
        },
        "payment_status": "pending"
    }
]
Version update available Please adjust your integration to the latest stable version (1.9.0)
0.2.2 stable