Skip to content
Membership Cards
JSON

JSON

JSON Membership Card Data

To support future integrations, and well as third party wallets like Apple Wallet and Google Pay, we offer a JSON endpoint that contains the raw data. It includes the user’s Member ID and the plan’s BIN, PCN, and GROUP number. This information is needed by a pharmacist to price a medication, or process an Inside Rx claim at the pharmacy counter. A X-API-KEY is used with the card JSON endpoint to automatically configure the card based on account settings for the provisioned account.

Subsequent requests generate new membership information. Card data works for all medications covered by Inside Rx and can be shared with other patients.

Membership cards are available for both people and pets. The membership information is different for each type of card, complete with different pricing results. Claims for people cannot be processed under the pets membership card and vice versa. Provisioned accounts can have both people and pets, or only one enabled. This depends on the contract signed during account setup.

Combined JSON Data (recommended)

The combined card download uses the account settings configured for the X-API-KEY to generate 1 to 2 membership cards. Either the response will provide both people and pets membership cards, or only a single card will be generated if an account is configured for only people or pets. This endpoint is automatic and recommended for most use-cases.

HTTP Request

GET https://services.insiderx.com/membership/v1/json HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

HTTP Query Params

paramDescription
accessCodestring (optional) Used to associate a card request with a co-brand for the provisioned account.

Response Types

CodeDescription
200Successful creation of membership card.
403Lack of permissions to generate card.
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.

AttributeDescription
idstring Internal ID used for tracking purposes.
cards[].memberIdstring Unique identifier for requested card. Needed by the pharmacist.
cards[].groupstring Group used for the card. Needed by the pharmacist.
cards[].binstring BIN used for routing. Needed by the pharmacist.
cards[].pcnstring PCN used for routing. Needed by the pharmacist.
cards[].typestring Card usage type. Used to control theme. Either people or pets.
cards[].configIdstring Internal configuration ID to retrieve the card details.
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/membership/v1/json \
  -H "Content-Type: application/json" \
  -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt"

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",
  "cards": [
    {
      "memberId": "36YDIG22222M",
      "group": "SVECARD",
      "bin": "019363",
      "pcn": "7283",
      "type": "people",
      "configId": "F80A926A"
    },
    {
      "memberId": "36YPED22222N",
      "group": "SVECD99",
      "bin": "019363",
      "pcn": "7283",
      "type": "pets",
      "configId": "F80A926A"
    }
  ]
}

Example JSON Response for Missing or Incorrect Request Data

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

Card Data for People Only

This endpoint will ensure that regardless of how an account is configured, only the people membership card will be generated. An account must be enabled with this membership card type.

HTTP Request

GET https://services.insiderx.com/membership/v1/json/people HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

HTTP Query Params

paramDescription
accessCodestring (optional) Used to associate a card request with a co-brand for the provisioned account.

Response Types

CodeDescription
200Successful creation of membership card.
403Lack of permissions to generate card.
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.

AttributeDescription
idstring Internal ID used for tracking purposes.
memberIdstring Unique identifier for requested card. Needed by the pharmacist.
groupstring Benefit group used for the card. Needed by the pharmacist.
binstring BIN used for routing. Needed by the pharmacist.
pcnstring PCN used for routing. Needed by the pharmacist.
configIdstring Internal configuration ID to retrieve the card details.
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/membership/v1/json/people \
  -H "Content-Type: application/json" \
  -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt"

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",
  "memberId": "36YDIG22222M",
  "group": "SVECARD",
  "bin": "019363",
  "pcn": "7283",
  "configId": "F80A926A"
}

Example JSON Response for Missing or Incorrect Request Data

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

Card Data for Pets Only

This endpoint will ensure that regardless of how an account is configured, only the pets membership card will be generated. An account must be enabled with this membership card type.

HTTP Request

GET https://services.insiderx.com/membership/v1/json/pets HTTP/1.1
Content-Type: application/json
x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt

HTTP Query Params

paramDescription
accessCodestring (optional) Used to associate a card request with a co-brand for the provisioned account.

Response Types

CodeDescription
200Successful creation of membership card.
403Lack of permissions to generate card.
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.

AttributeDescription
idstring Internal ID used for tracking purposes.
memberIdstring Unique identifier for requested card. Needed by the pharmacist.
groupstring Benefit group used for the card. Needed by the pharmacist.
binstring BIN used for routing. Needed by the pharmacist.
pcnstring PCN used for routing. Needed by the pharmacist.
configIdstring Internal configuration ID to retrieve the card details.
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/membership/v1/json/pets \
  -H "Content-Type: application/json" \
  -H "x-api-key: zW7PKpzy6X7UHlI4NymTG8QmYhSlFwVd44xapRCt"

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",
  "memberId": "36YPED22222N",
  "group": "SVECD99",
  "bin": "019363",
  "pcn": "7283",
  "configId": "F80A926A"
}

Example JSON Response for Missing or Incorrect Request Data

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

Error Codes

Error CodeDescription
LOCALE_INCORRECT_OR_MISSINGHTTP POST parameter locale is invalid.