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: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCtHTTP 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.
| param | Description |
|---|---|
action | string Identifies the action to take, either create or update. See actions. |
active | boolean (optional) Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility. |
memberId | string Member ID of the member, typically the same as a card number. |
group | string Benefit group number of the member. |
subId | string (optional) Unique identifier for members sharing the same memberId within a group. |
firstName | string (optional) Member’s first name. |
middleName | string (optional) Member’s middle name. |
lastName | string (optional) Member’s last name. |
suffix | string (optional) Member’s suffix. |
gender | string (optional) Gender of member. Either unknown (default), male, or female. |
dob | string (optional) Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
email | string (optional) Email of member. |
phone | string (optional) 10 digit phone number of member. Example - ‘5125458080’ |
address.line1 | string (optional) First line of member’s street address. Example - ‘123 Main Street’ |
address.line2 | string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’ |
address.city | string (optional) City of member’s address. |
address.state | string (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas. |
address.zip | string (optional) Five digit zip code of member’s address. |
address.zipExtension | string (optional) Four digit zip extension of member’s address. |
startDate | string (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
endDate | string (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
originDate | string (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
Response Types
| Code | Description |
|---|---|
| 200 | Successful processed enrollment creation or update. |
| 400 | Incorrect or missing required parameters. |
| 400 | Enrollment Already Exists. Use update action instead. |
| 403 | Lack of permissions to process enrollment. |
| 404 | Member not found. |
| 500 | Internal 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.
| Attribute | Description |
|---|---|
id | string Internal ID used for tracking purposes. |
action | string Identifies the requested action that was processed. See actions. |
active | boolean Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility. |
memberId | string (optional) Member Id of the member. |
group | string (optional) Benefit group number of the member. |
subId | string (optional) Unique subId provided. |
firstName | string (optional) Member’s first name. |
middleName | string (optional) Member’s middle name. |
lastName | string (optional) Member’s last name. |
suffix | string (optional) Member’s suffix. |
gender | string (optional) Gender of member. Either unknown (default), male, or female. |
dob | string (optional) Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
email | string (optional) Email of member. |
phone | string (optional) 10 digit phone number of member. Example - ‘5125458080’ |
address.line1 | string (optional) First line of member’s street address. Example - ‘123 Main Street’ |
address.line2 | string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’ |
address.city | string (optional) City of member’s address. |
address.state | string (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas. |
address.zip | string (optional) Five digit zip code of member’s address. |
address.zipExtension | string (optional) Four digit zip extension of member’s address. |
startDate | string (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
endDate | string (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
originDate | string (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
statusCode | integer (optional) HTTP status code in case of failure. |
message | string (optional) Error description. |
errorCode | string (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: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCtHTTP 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.
| param | Description |
|---|---|
action | string Identifies the action to take, either create or update. See actions. |
active | boolean (optional) Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility. |
memberId | string Member Id of the member, typically the same as a card number. |
group | string Benefit group number of the member. |
subId | string (optional) Unique identifier for members sharing the same memberId within a group. |
firstName | string Member’s first name. |
middleName | string (optional) Member’s middle name. |
lastName | string Member’s last name. |
suffix | string (optional) Member’s suffix. |
gender | string (optional) Gender of member. Either unknown (default), male, or female. |
dob | string Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
email | string (optional) Email of member. |
phone | string (optional) 10 digit phone number of member. Example - ‘5125458080’ |
address.line1 | string (optional) First line of member’s street address. Example - ‘123 Main Street’ |
address.line2 | string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’ |
address.city | string (optional) City of member’s address. |
address.state | string (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas. |
address.zip | string (optional) Five digit zip code of member’s address. |
address.zipExtension | string (optional) Four digit zip extension of member’s address. |
startDate | string (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
endDate | string (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
originDate | string (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
Response Types
| Code | Description |
|---|---|
| 200 | Successful processed enrollment creation or update. |
| 400 | Incorrect or missing required parameters. |
| 400 | Enrollment Already Exists. Use update action instead. |
| 403 | Lack of permissions to process enrollment. |
| 404 | Member not found. |
| 500 | Internal 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.
| Attribute | Description |
|---|---|
id | string Internal ID used for tracking purposes. |
action | string Identifies the requested action that was processed. See actions. |
active | boolean Identifies if the enrollment is active. Either true (default), or false. A false active state will reject during eligibility. |
memberId | string (optional) Member Id of the member. |
group | string (optional) Benefit group number of the member. |
subId | string (optional) Unique subId provided. |
firstName | string Member’s first name. |
middleName | string (optional) Member’s middle name. |
lastName | string Member’s last name. |
suffix | string (optional) Member’s suffix. |
gender | string (optional) Gender of member. Either unknown (default), male, or female. |
dob | string Date of birth of member. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
email | string (optional) Email of member. |
phone | string (optional) 10 digit phone number of member. Example - ‘5125458080’ |
address.line1 | string (optional) First line of member’s street address. Example - ‘123 Main Street’ |
address.line2 | string (optional) Apartment/unit number or continuation of member’s street address. Example - ‘Apt #1104’ |
address.city | string (optional) City of member’s address. |
address.state | string (optional) Two letter state abbreviation of member’s address. Example - ‘TX’ represents Texas. |
address.zip | string (optional) Five digit zip code of member’s address. |
address.zipExtension | string (optional) Four digit zip extension of member’s address. |
startDate | string (optional) Date enrollment starts. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
endDate | string (optional) Date enrollment expires. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
originDate | string (optional) Date of initial account creation. Uses YYYY-MM-DD format. Example - ‘1983-03-31’ represents March 31, 1983. |
statusCode | integer (optional) HTTP status code in case of failure. |
message | string (optional) Error description. |
errorCode | string (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.
| Action | Description |
|---|---|
create | Creates a new enrollment record for the member. |
update | Updates an existing member enrollment record. |
Error Codes
| Error Code | Description |
|---|---|
ACTION_INCORRECT_OR_MISSING | Required HTTP POST parameter action is either missing or invalid. |
ACTIVE_INCORRECT_OR_MISSING | HTTP POST parameter active is invalid. |
MEMBER_ID_INCORRECT_OR_MISSING | Required HTTP POST parameter memberId is either missing or invalid. |
GROUP_INCORRECT_OR_MISSING | Required HTTP POST parameter group is either missing or invalid. |
FIRST_NAME_INCORRECT_OR_MISSING | Required HTTP POST parameter firstName is either missing or invalid. |
LAST_NAME_INCORRECT_OR_MISSING | Required HTTP POST parameter lastName is either missing or invalid. |
GENDER_INCORRECT_OR_MISSING | HTTP POST parameter gender is invalid. |
DOB_INCORRECT_OR_MISSING | Required HTTP POST parameter dob is either missing or invalid. |
EMAIL_INCORRECT_OR_MISSING | HTTP POST parameter email is invalid. |
PHONE_INCORRECT_OR_MISSING | HTTP POST parameter phone is either missing or invalid. |
ADDRESS_INCORRECT_OR_MISSING | HTTP POST parameter address is invalid. |
ADDRESS_STATE_INCORRECT_OR_MISSING | HTTP POST parameter address.state is invalid. |
ADDRESS_ZIP_INCORRECT_OR_MISSING | HTTP POST parameter address.zip is invalid. |
ADDRESS_ZIP_EXT_INCORRECT_OR_MISSING | HTTP POST parameter address.zipExtension is invalid. |
START_DATE_INCORRECT_OR_MISSING | HTTP POST parameter startDate is invalid. |
END_DATE_INCORRECT_OR_MISSING | HTTP POST parameter endDate is invalid. |
ORIGIN_DATE_INCORRECT_OR_MISSING | HTTP POST parameter originDate is invalid. |