Allow Admin To Access a Location or Location Group

​

Updates the permission settings of an admin user to allow the admin to access a store number, location, or location group

Headers

  • Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".

  • Advertises which content types the client is able to understand

  • Set this header to application/json.

Body

application/json
  • ID of the admin whose permissions will be updated

  • Properties: 3

Responses

  • application/json
Request Example for patch/api2/dashboard/business_admins/authorizations
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/business_admins/authorizations \
  --request PATCH \
  --header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "admin_id": "3803",
  "business_admins": {
    "accessible_store_numbers": [
      "s10",
      "w12"
    ],
    "accessible_location_group_ids": [
      45
    ]
  }
}'
{
  "admin_id": 3803,
  "email": "test@example.com",
  "first_name": "FIRST_NAME_GOES_HERE",
  "last_name": "LAST_NAME_GOES_HERE",
  "timezone": "America/Los_Angeles",
  "role_id": 10,
  "accessible_locations": {
    "location_ids": [
      542,
      3940
    ],
    "store_numbers": [
      "s10",
      "w12"
    ]
  },
  "accessible_location_groups": {
    "location_group_id": 45,
    "name": "East Cost"
  }
}