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 3c33f658fd857091859084bbc0239ce7f28f61d93fc7e95d1877bac614d19bf7ffa6e1430e70a5caf9e73fbb135207f7e13555d95e95e98666cc783022df07c1e7e7a99166650ea25989729963d36d3f92986534c048b3e7a4e4c3a86256135f671b8dbc
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 872f4d1675ae0803eab398b2fb7bbaab7fdae5c54c10ba72de4370b4deff6437874450e71041aefdaad03fa7279e0f5303f89a6c4f7ce116b58b586e395c93acb9a3d85ae52f8454a8020afcb1d77bef26f57cf4ea5b1f04858312589aa387ee83634900
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 a3d6be363e88f627ee5f472db760023494a9acb815e840397e9be524b0c8e6b9c786b4725bbc5c722d959ce26979d2a43327fe780c5a950c99ae9b83a038eae9e5eaa4fd5c9beebb872ee011f5b9fde994f39600fe50d7a5c90abcd248b0d56c1be2ca91
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: 456

{
    "firstname": "Xander",
    "lastname": "Petit",
    "email": "ujansen7248032@example.org",
    "telephone": "+32 479 56 73 45",
    "notifications": {
        "email_when_order": true,
        "email_when_comment": true,
        "email_when_order_confirmed": true,
        "email_when_order_cancel": true,
        "email_when_newsletter": true
    },
    "id": 86233,
    "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: 589

{
    "firstname": "Noa",
    "lastname": "Somers",
    "email": "lotte822218192@example.com",
    "telephone": "+32 479 56 73 45",
    "notifications": {
        "email_when_order": true,
        "email_when_comment": true,
        "email_when_order_confirmed": true,
        "email_when_order_cancel": true,
        "email_when_newsletter": true
    },
    "id": 86235,
    "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: 715

{
    "firstname": "Dylan",
    "lastname": "Messaoudi",
    "email": "roland.marie775108@example.com",
    "telephone": "+32 479 56 73 45",
    "notifications": {
        "email_when_order": true,
        "email_when_comment": true,
        "email_when_order_confirmed": true,
        "email_when_order_cancel": true,
        "email_when_newsletter": true
    },
    "id": 86236,
    "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": ""
}
1.5.0 stable