Skip to content

Copy a User to Companies

Request

Copies an active user and their permissions to multiple locations at once. If the user does not yet exist in a location, they will be added as an active user. If the user has already been invited to the location, only their permissions will be updated — however, they will still need to accept the invitation.

Security
BearerPartnerUser
Path
location_idnumberrequired

ID of a location.

Example:123
user_idnumberrequired

ID of a user.

Example:123
Headers
Acceptstringrequired

Required B2B v2 response media type. Use application/vnd.api.v2+json. A charset parameter is also accepted.

Default:"application/vnd.api.v2+json"
Example:application/vnd.api.v2+json
Content-Typestringrequired

Should be equal to application/json

Example:application/json
Bodyapplication/json
curl -i -X POST \
  https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/123/users/123/copy_to_companies \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "user_company_links": [
      {
        "company_id": 123,
        "user_permissions": [
          {
            "slug": "timetable_access",
            "value": true
          }
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
successboolean(Successful response status)

Response status.

Example:true
dataobject or null(No data in response)

Response data.

Example:null
metaArray of any or object(Empty meta object)

Additional response data (empty object or empty array)

Example:
{}
Response
{ "success": true, "data": null, "meta": {} }