Get all user discounts from a shop

GET /company/shops/@id/user-discounts

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
id Int Shop ID

Example request 1

GET /company/shops/17/user-discounts HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.9.0
Accept-Language: en-US,en;q=0.5

Response

Array of company.UserDiscount: [company.UserDiscount]

company.UserDiscount

Field Type Description
percent Int An integer value
user Dictionary A dictionary with fields
id Int An integer value
shop_id Int An integer value

Example response 1

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

[
    {
        "percent": 15,
        "user": {
            "id": 13,
            "email": "example@domain.com"
        },
        "id": 12,
        "shop_id": 14
    },
    {
        "percent": 17,
        "user": {
            "id": 17,
            "email": "example@domain.com"
        },
        "id": 10,
        "shop_id": 12
    },
    {
        "percent": 13,
        "user": {
            "id": 19,
            "email": "example@domain.com"
        },
        "id": 16,
        "shop_id": 11
    }
]
1.9.0 stable