Skip to content

All Invites

Request URL

POST /invites/all

Description

List all invites and objectLinks for the current user. If any invites or objectLinks are included in the request body when syncing, they will be removed. All remaining invites and objectLinks will be returned.

Schema

Property table for invites/all

Property Description Required Schema
invites invites No array of invites item objects
objectLinks objectLinks No array of objectLinks item objects

Property table for invites array item object

Property Description Required Schema
isActive true if active No {
  "type": "boolean",
  "nullable": true
}
AFiInviteId ampliFi ID of the invite No {
  "type": "string",
  "nullable": true
}

Property table for objectLinks array item object

Property Description Required Schema
isActive true if active No {
  "type": "boolean",
  "nullable": true
}
AFiObjectLinkId ampliFi ID of the invite No {
  "type": "string",
  "nullable": true
}

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/invites/all',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/invites/all"  --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 INVITES/ALL SUCCESSFUL RESPONSE GET ALL INVITES

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

REQUEST BODY

none

RESPONSE BODY

{
    "invites": [
        {
            "AFiInviteId": "qwechytbbgbyyyfwamwquprtqibrrbtaezvukvxocbd",
            "AFiUserId": "qweaurl8kgtlv9pc",
            "AFiAccountId": "qwegal8kgtmysmels",
            "AFiCardId": "qwegal8kgtmysmels",
            "role": "test",
            "familyMemberType": null,
            "linklink": "AAORSLADF",
            "firstName": "Suzy",
            "lastName": "Queue",
            "dtsCreated": "2023-12-15T12:39:20.402Z",
            "dtsExpiry": "2023-12-17T12:39:20.402Z",
            "isActive": true
        }
    ],
    "objectLinks": [],
    "success": true
}