Update user permissions

PATCH /company/companies/@id/permissions/users/@user_permission_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 The ID of the company
user_permission_id Int The ID of the permission entry

Body

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

Field Type Description
shop_ids [Int] User has access to these shops
permissions Dictionary A dictionary with fields

Example request 1

PATCH /company/companies/14/permissions/users/17 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: 415
{
    "shop_ids": [
        14,
        14,
        14
    ],
    "permissions": {
        "company_info": true,
        "holidays": true,
        "newsletters": true,
        "translations": true,
        "permissions": true,
        "email_settings": false,
        "products": true,
        "shop_info": true,
        "checkout_settings": false,
        "time_settings": false,
        "discounts": false
    }
}

Response

Field Type Description
shop_ids [Int] User has access to these shops
permissions Dictionary A dictionary with fields
id Int Id of the permissions entry
user Dictionary A dictionary with fields

Example response 1

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

{
    "shop_ids": [
        19,
        12,
        12
    ],
    "permissions": {
        "company_info": true,
        "holidays": false,
        "newsletters": false,
        "translations": true,
        "permissions": false,
        "email_settings": false,
        "products": true,
        "shop_info": true,
        "checkout_settings": true,
        "time_settings": true,
        "discounts": false
    },
    "id": 17,
    "user": {
        "id": 19,
        "email": "..."
    }
}
This is a development version Do not use this version in production
1.10.0 development