Skip to content
Eligibility
Enrollment

Enrollment

Eligibility Enrollment

Inside Rx offers a global enrollment endpoints to support various eligibility models. The endpoints are designed to be flexible enough to support many client use cases. An X-API-KEY is used with all endpoints to automatically configure validations for the provisioned account.

Enroll Card

This endpoint is used to enroll a card into an eligibility program. It can also update the current eligibility status of the card program, including deactivating the card. Because of the flexible nature of the endpoint, action is required to ensure we know how to handle the request correctly.

Note

Additional fields may be required depending on how eligibility is configured for the provisioned account.

HTTP Request

POST https://services.insiderx.com/eligibility/v1/enrollment/card HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

HTTP POST Params

The following params are sent as JSON in the request body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.

paramDescription
actionstring Identifies the action to take, either create or update. See actions.
activeboolean (optional) Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility.
memberIdstring Member ID of the member, typically the same as a card number.
groupstring Benefit group number of the member.
subIdstring (optional) Unique identifier for members sharing the same memberId within a group.
firstNamestring (optional) Member’s first name.
middleNamestring (optional) Member’s middle name.
lastNamestring (optional) Member’s last name.
suffixstring (optional) Member’s suffix.
genderstring (optional) Gender of member. Either unknown (default), male, or female.
dobstring (optional) Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
emailstring (optional) Email of member.
phonestring (optional) 10 digit phone number of member. Example - ‘5125458080’
address.line1string (optional) First line of member’s street address. Example - ‘123 Main Street’
address.line2string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’
address.citystring (optional) City of member’s address.
address.statestring (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas.
address.zipstring (optional) Five digit zip code of member’s address.
address.zipExtensionstring (optional) Four digit zip extension of member’s address.
startDatestring (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
endDatestring (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
originDatestring (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.

Response Types

CodeDescription
200Successful processed enrollment creation or update.
400Incorrect or missing required parameters.
400Enrollment Already Exists. Use update action instead.
403Lack of permissions to process enrollment.
404Member not found.
500Internal server error, something went wrong.

Response Attributes

The following attributes are returned as an object within the response body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.

Note

All non-empty fields for the member will be returned to ensure that the data maintained is correct.

AttributeDescription
idstring Internal ID used for tracking purposes.
actionstring Identifies the requested action that was processed. See actions.
activeboolean Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility.
memberIdstring (optional) Member Id of the member.
groupstring (optional) Benefit group number of the member.
subIdstring (optional) Unique subId provided.
firstNamestring (optional) Member’s first name.
middleNamestring (optional) Member’s middle name.
lastNamestring (optional) Member’s last name.
suffixstring (optional) Member’s suffix.
genderstring (optional) Gender of member. Either unknown (default), male, or female.
dobstring (optional) Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
emailstring (optional) Email of member.
phonestring (optional) 10 digit phone number of member. Example - ‘5125458080’
address.line1string (optional) First line of member’s street address. Example - ‘123 Main Street’
address.line2string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’
address.citystring (optional) City of member’s address.
address.statestring (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas.
address.zipstring (optional) Five digit zip code of member’s address.
address.zipExtensionstring (optional) Four digit zip extension of member’s address.
startDatestring (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
endDatestring (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
originDatestring (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
statusCodeinteger (optional) HTTP status code in case of failure.
messagestring (optional) Error description.
errorCodestring (optional) Error Code for validation failures. See Error Codes.

Example CURL Request

curl https://services.insiderx.com/eligibility/v1/enrollment/card \
   -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt" \
   -d action="create" \
   -d memberId="AB12345678" \
   -d group="SAVE11" \
   -d startDate="2018-09-26" \
   -d endDate="2019-09-26"

Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.

Example JSON Response

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "action": "create",
  "active": true,
  "memberId": "AB12345678",
  "group": "SAVE11",
  "gender": "unknown",
  "startDate": "2018-09-26",
  "endDate": "2019-09-26"
}

Example JSON Response for Missing or Incorrect Request Data

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "message": "Incorrect or missing required parameters.",
  "statusCode": 400,
  "errorCode": "MEMBER_ID_INCORRECT_OR_MISSING"
}

Enroll Person

This endpoint is used to enroll a person into an eligibility program. It can also update the current eligibility status of the person within the program, including deactivating the member. Because of the flexible nature of the endpoint, action is required to ensure we know how to handle the request correctly.

Note

Additional fields may be required depending on how eligibility is configured for the provisioned account.

HTTP Request

POST https://services.insiderx.com/eligibility/v1/enrollment/person HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

HTTP POST Params

The following params are sent as JSON in the request body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.

paramDescription
actionstring Identifies the action to take, either create or update. See actions.
activeboolean (optional) Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility.
memberIdstring Member Id of the member, typically the same as a card number.
groupstring Benefit group number of the member.
subIdstring (optional) Unique identifier for members sharing the same memberId within a group.
firstNamestring Member’s first name.
middleNamestring (optional) Member’s middle name.
lastNamestring Member’s last name.
suffixstring (optional) Member’s suffix.
genderstring (optional) Gender of member. Either unknown (default), male, or female.
dobstring Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
emailstring (optional) Email of member.
phonestring (optional) 10 digit phone number of member. Example - ‘5125458080’
address.line1string (optional) First line of member’s street address. Example - ‘123 Main Street’
address.line2string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’
address.citystring (optional) City of member’s address.
address.statestring (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas.
address.zipstring (optional) Five digit zip code of member’s address.
address.zipExtensionstring (optional) Four digit zip extension of member’s address.
startDatestring (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
endDatestring (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
originDatestring (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.

Response Types

CodeDescription
200Successful processed enrollment creation or update.
400Incorrect or missing required parameters.
400Enrollment Already Exists. Use update action instead.
403Lack of permissions to process enrollment.
404Member not found.
500Internal server error, something went wrong.

Response Attributes

The following attributes are returned as an object within the response body. Dot notation is used to represent nested objects. Square bracket notation represents items that are nested within an array.

Note

All non-empty fields for the member will be returned to ensure that the data maintained is correct.

AttributeDescription
idstring Internal ID used for tracking purposes.
actionstring Identifies the requested action that was processed. See actions.
activeboolean Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility.
memberIdstring (optional) Member Id of the member.
groupstring (optional) Benefit group number of the member.
subIdstring (optional) Unique subId provided.
firstNamestring Member’s first name.
middleNamestring (optional) Member’s middle name.
lastNamestring Member’s last name.
suffixstring (optional) Member’s suffix.
genderstring (optional) Gender of member. Either unknown (default), male, or female.
dobstring Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
emailstring (optional) Email of member.
phonestring (optional) 10 digit phone number of member. Example - ‘5125458080’
address.line1string (optional) First line of member’s street address. Example - ‘123 Main Street’
address.line2string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’
address.citystring (optional) City of member’s address.
address.statestring (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas.
address.zipstring (optional) Five digit zip code of member’s address.
address.zipExtensionstring (optional) Four digit zip extension of member’s address.
startDatestring (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
endDatestring (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
originDatestring (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983.
statusCodeinteger (optional) HTTP status code in case of failure.
messagestring (optional) Error description.
errorCodestring (optional) Error Code for validation failures. See Error Codes.

Example CURL Request

curl https://services.insiderx.com/eligibility/v1/enrollment/person \
  -H "Content-Type: application/json" \
  -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt" \
  -d action="create" \
  -d memberId="AB12345678" \
  -d group="SAVE11" \
  -d firstName="Jane" \
  -d lastName="Doe" \
  -d dob="1980-03-23"

Where x-api-key is the private key provided when provisioning an account. The example key above is for demonstration purposes.

Example JSON Response

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "action": "create",
  "active": true,
  "memberId": "AB12345678",
  "group": "SAVE11",
  "firstName": "Jane",
  "lastName": "Doe",
  "gender": "unknown",
  "dob": "1980-03-23"
}

Example JSON Response for Missing or Incorrect Request Data

{
  "id": "d54c54ad-40be-4305-8a34-0ab44710b90d",
  "message": "Incorrect or missing required parameters.",
  "statusCode": 400,
  "errorCode": "MEMBER_ID_INCORRECT_OR_MISSING"
}

Actions

Below are the valid actions that can be processed.

ActionDescription
createCreates a new enrollment record for the member.
updateUpdates an existing member enrollment record.

Error Codes

Error CodeDescription
ACTION_INCORRECT_OR_MISSINGRequired HTTP POST parameter action is either missing or invalid.
ACTIVE_INCORRECT_OR_MISSINGHTTP POST parameter active is invalid.
MEMBER_ID_INCORRECT_OR_MISSINGRequired HTTP POST parameter memberId is either missing or invalid.
GROUP_INCORRECT_OR_MISSINGRequired HTTP POST parameter group is either missing or invalid.
FIRST_NAME_INCORRECT_OR_MISSINGRequired HTTP POST parameter firstName is either missing or invalid.
LAST_NAME_INCORRECT_OR_MISSINGRequired HTTP POST parameter lastName is either missing or invalid.
GENDER_INCORRECT_OR_MISSINGHTTP POST parameter gender is invalid.
DOB_INCORRECT_OR_MISSINGRequired HTTP POST parameter dob is either missing or invalid.
EMAIL_INCORRECT_OR_MISSINGHTTP POST parameter email is invalid.
PHONE_INCORRECT_OR_MISSINGHTTP POST parameter phone is either missing or invalid.
ADDRESS_INCORRECT_OR_MISSINGHTTP POST parameter address is invalid.
ADDRESS_STATE_INCORRECT_OR_MISSINGHTTP POST parameter address.state is invalid.
ADDRESS_ZIP_INCORRECT_OR_MISSINGHTTP POST parameter address.zip is invalid.
ADDRESS_ZIP_EXT_INCORRECT_OR_MISSINGHTTP POST parameter address.zipExtension is invalid.
START_DATE_INCORRECT_OR_MISSINGHTTP POST parameter startDate is invalid.
END_DATE_INCORRECT_OR_MISSINGHTTP POST parameter endDate is invalid.
ORIGIN_DATE_INCORRECT_OR_MISSINGHTTP POST parameter originDate is invalid.