Skip to content

Create and Send an Invitation

Request

An invitation to manage a location is sent via email or phone as a link. By following the link and completing registration, the user gains access to manage the location according to the permissions assigned. Permission assignment is performed in a separate request after the invitation is sent.

Security
BearerPartnerUser
Path
location_idnumberrequired

ID of a location.

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
invitesArray of objectsrequired

Array of invites

curl -i -X POST \
  https://developer.alteg.io/_mock/en/b2b-v1/openapi/user/invite/123 \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "invites": [
      {
        "name": "Olivia",
        "search": "mail@gmail.com",
        "position": "Administrator",
        "user_role": "administrator",
        "user_permissions": [
          {
            "slug": "timetable_access",
            "value": true
          }
        ],
        "staff_id": 12
      }
    ]
  }'

Responses

Accepted

Bodyapplication/json
successboolean

Send success status (true)

Example:true
datastring

Is null

metaobject

Metadata (contains a message that the data has been saved)

Example:
{ "message": "Saved" }
Response
{ "success": true, "meta": { "message": "Saved" } }