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 c1ff1c5ea6fcade9af41ae5cc8e039ec491f82e6a358e9bfe55d998176cc00307146cf70808c3b3fe7bd95a7cc183c17530df07e302bc0a31f072e5164a832726ef9527a8fab4ff4508bad7c2ec477049c3829b98dc2a60b58423b9f952ec1c327e3c397
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 717303b2827a747e7703e54ab083aecc4b6bbec2b2ecbd1b8476c67c651dd8bd95d54555fe1f0615ad2de4781b23eb09d32c6f254e0371a823485b855db6fe4b8f204d2bccb4b4685773038b172a4a0ac603b57776b40395e82919b4762c8fbda36113db
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 5e2629d45b9571cc5c07ac07dfe9eb80953587a781fc4af625d42d63219f284c58b933fde549270971caedd94f9077dd9bcdeaab538cda3d18f791bad36979253f2c96265ac8af56c35fae5720f833f6675bed363e8cba82988a15bfd6b27cb95f3b4a4c
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": "Julien",
    "lastname": "Mahieu",
    "email": "udesmedt5639351@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": 129,
    "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: 592

{
    "firstname": "Nathan",
    "lastname": "Verhaeghe",
    "email": "milan75164333@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": 131,
    "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: 707

{
    "firstname": "Pauline",
    "lastname": "Segers",
    "email": "hjacob7247814@example.net",
    "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": 132,
    "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