Create a user discount entry

POST /company/shops/@id/user-discounts/@user_id

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
user_id Int User ID

Body

Pass the following properties via application/json or form encoding in the body of the request.

Field Type Description
percent Int An integer value

Example request 1

POST /company/shops/16/user-discounts/15 HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.10.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 21
{
    "percent": 18
}

Response

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: 131

{
    "percent": 18,
    "user": {
        "id": 12,
        "email": "example@domain.com"
    },
    "id": 13,
    "shop_id": 19
}
This is a development version Do not use this version in production
1.10.0 development