Skip to content

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/details

Headers ​

HeaderRequiredDescription
x-nextinteract-company-api-keyYesAdmin-specific API key UUID provided to company

Parameters ​

ParameterTypeRequiredDescription
userIdNumberYesUser id for which the membership details will be saved
membershipIdString[100]YesMembership Id# to be set for a User
statusString[50]NoAn arbitrary status that the API caller can set to suit their membership needs e.g. SUBSCRIBED, UNSUBSCRIBED, Bronze, Silver, Gold etc
statusDateDatetimeNoAn arbitrary date that the API caller can set to suit their membership needs. Could represent date subscribed or date to expire etc
customField1-5String[100]NoCustom 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 ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSRecordNotFoundExceptionSee Error Definitions
WSCompanyApiKeyNotActiveExceptionSee Error Definitions
WSCompanyNotActiveExceptionSee Error Definitions
WSUserNotFoundExceptionSee Error Definitions
WSUserNotActiveExceptionSee Error Definitions
WSConnectionStatusNotActiveExceptionSee Error Definitions
WSMembershipServiceExceptionSee Error Definitions