Skip to main content
POST
/
api
/
groups
/
{group_id}
/
location_groups
Add locations to a group
curl --request POST \
  --url https://clarus-api.com/api/groups/{group_id}/location_groups \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "location_groups",
    "attributes": {
      "group_id": 42,
      "location_ids": [
        1057,
        1058,
        1059
      ]
    }
  }
}
'
{
  "error": "<string>"
}

Request Structure

{
  "data": {
    "type": "location_groups",
    "attributes": {
      "group_id": 42,
      "location_ids": [1057, 1058, 1059]
    }
  }
}
FieldRequiredDescription
group_idYesThe group to add locations to
location_idOne ofSingle location ID
location_idsOne ofArray of location IDs

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

group_id
integer
required

The group ID

Body

application/json
data
object
required

Response

Locations added to the group