Appearance
createMembershipDetails ​
Creates a UserIdentifer record for a User based on the API Key which must be linked to a specific membership-related Global Identifier e.g. PSANZ
Request ​
http
POST /rest/company/membership/detailsHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-company-api-key | Yes | Admin-specific API key UUID provided to company |
Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | Number | Yes | User id for which the membership details will be saved |
membershipId | String[100] | Yes | Membership Id# to be set for a User |
status | String[50] | No | An arbitrary status that the API caller can set to suit their membership needs e.g. SUBSCRIBED, UNSUBSCRIBED, Bronze, Silver, Gold etc |
statusDate | Datetime | No | An arbitrary date that the API caller can set to suit their membership needs. Could represent date subscribed or date to expire etc |
customField1-5 | String[100] | No | Custom fields that the API caller can use for any custom data they need to store |
json
{
"userId": 8,
"membershipId": "PSANZ123456",
"status": "SUBSCRIBED",
"statusDate": 1533509868501,
"customField1": null,
"customField2": null,
"customField3": null,
"customField4": null,
"customField5": null
}Response ​
200 OK ​
json
{
"userId": 8,
"membershipId": "PSANZ123456",
"status": "SUBSCRIBED",
"statusDate": 1533509868501,
"customField1": null,
"customField2": null,
"customField3": null,
"customField4": null,
"customField5": null
}Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSRecordNotFoundException | See Error Definitions |
WSCompanyApiKeyNotActiveException | See Error Definitions |
WSCompanyNotActiveException | See Error Definitions |
WSUserNotFoundException | See Error Definitions |
WSUserNotActiveException | See Error Definitions |
WSConnectionStatusNotActiveException | See Error Definitions |
WSMembershipServiceException | See Error Definitions |