Get information about the authenticated user

GET /user

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

Example request 1 Get the current user

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

Example request 2 User with a delivery address

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

Example request 3 User with a company (invoice settings)

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

Response

Information about a user

Field Type Description
firstname String A String value
lastname String A String value
email Email Email address
telephone Phone International phone number
notifications UserNotifications Information about the notifications a user want to receive
id Int An integer value
delivery_address Address.simple? Nullable. An address
company Checkout.Company? Nullable.
bank_account_number String? Nullable. A String value

Example response 1 Get the current user

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

{
    "firstname": "Wout",
    "lastname": "De Vos",
    "email": "mbogaerts1073085@example.org",
    "telephone": "+32479567345",
    "notifications": {
        "email_when_order": true,
        "email_when_comment": true,
        "email_when_order_confirmed": true,
        "email_when_order_cancel": true,
        "email_when_newsletter": true
    },
    "id": 2952,
    "delivery_address": null,
    "company": null,
    "bank_account_number": ""
}

Example response 2 User with a delivery address

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

{
    "firstname": "Ruben",
    "lastname": "Vandamme",
    "email": "malak437702183@example.com",
    "telephone": "+32479567345",
    "notifications": {
        "email_when_order": true,
        "email_when_comment": true,
        "email_when_order_confirmed": true,
        "email_when_order_cancel": true,
        "email_when_newsletter": true
    },
    "id": 2959,
    "delivery_address": {
        "street": "Sint-Denijslaan",
        "nr": "96",
        "zipcode": "9000",
        "city": "Gent",
        "country": "BE"
    },
    "company": null,
    "bank_account_number": ""
}

Example response 3 User with a company (invoice settings)

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

{
    "firstname": "Eloïse",
    "lastname": "Claessens",
    "email": "lefebvre.martin4385370@example.com",
    "telephone": "+32479567345",
    "notifications": {
        "email_when_order": true,
        "email_when_comment": true,
        "email_when_order_confirmed": true,
        "email_when_order_cancel": true,
        "email_when_newsletter": true
    },
    "id": 2960,
    "delivery_address": null,
    "company": {
        "name": "Localtomorrow NV",
        "vat": "BE1234 1234",
        "address": {
            "street": "Sint-Denijslaan",
            "nr": "96",
            "zipcode": "9000",
            "city": "Gent",
            "country": "BE"
        }
    },
    "bank_account_number": ""
}
Version update available Please adjust your integration to the latest stable version (1.5.2)
1.5.0 stable