Manage Partner Links (Multiple Accounts)
POST/client/users/:correlation_id/partners/:partner_id/links
Allows external client to create one or more links to a single loyalty program for one or more accounts.
Note: If there is an integration to send email notifications to the member based on partner linking/unlinking, those notifications will only be sent when the first card is linked and when the last card is unlinked.
Request
Body
See example Request below to view hierarchy.
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| PAYMENT_CARD | Link-type map | Object | Note that this may be a different value for other link-type maps |
| add, remove, or update | Type of operation on card | Enum: "add", "remove", or "update" | This array contains detailed information about each unprocessed record for this action |
| accountId | Unique loyalty account identifier | String | GUID format |
| linkId | External identifier | String | Required, needed to attempt a link. For instance, hashed payment card. |
| bin | Bank identification number | Number, 6 digits | Optional |
| last4 | Last 4 digits of the card number | Number, 4 digits | Required. Will not accept less or more than four digits. |
| metadata | Additional information about card | Object | Optional, contains additional information such as cardType and cardHolderType |
| cardType | Card type | String | "D" = debit, "C" = credit |
| cardholderType | Card holder type | Enum: "Retail" or "Business" |
Response
View example response to see hierarchy.
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| PAYMENT_CARD | Link-type map | Object | |
| success | Number of items that were successful processed from the request | Number | |
| unprocessed | Number of items that were not successfully processed | Number | |
| unprocessedItems | Returns information about each item that was not processed | Object | Contains fields below |
| {{operation}} | Type of operation on card | Enum: "add", "remove", or "update" | Array contains detailed information about unprocessed records |
| accountId | Unique loyalty account identifier | String | GUID format |
| linkId | External identifier | String | Required. For instance, hashed payment card. |
| bin | Bank identification number | Number, 6 digits | Optional |
| last4 | Last 4 digits of the card number | Number, 4 digits | Required |
| metadata | Additional information about card | Object | Optional |
| cardType | Card type | String | "D" = debit, "C" = credit |
| cardholderType | Card holder type | Enum: "Retail" or "Business" | |
| reasonCode | Code for an update failure | Enum: "LINK_LIMIT_MET", "DUPLICATE_REQUEST", "DUPLICATE_LINK", "LAST_4_REQUIRED", "INVALID_ACCOUNT", or "UNSUPPORTED_LINK_TYPE", "ACCOUNT_STATUS_IS_CLOSED" | |
| reasonMessage | Detailed explanation of the reason for an update failure | String | For example: "The provided account id does not exist." |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 - Bad Request | Request was malformed | MALFORMED_REQUEST | The format of the request was not correct. Check for syntax errors. |
| 400 - Bad Request | Cannot do more than 25 operation in a single request, you requested {{operations}}. | EXCEEDED_MAXIMUM_OPERATIONS | Break operations into multiple calls. |
| 404 - Not Found | Partner {{partner_id}} cannot be found. | INVALID_PARTNER_ID | The partner ID provided in the request is not valid. |
| 404 - Not Found | Account {{account_id}} cannot be linked. | CANNOT_LINK | An unregistered (ghost) account cannot be linked to a partner. |
Request
Responses
- 200
- 400
- 404
200 - Maximum Failures
400 - Malformed Request
404 - Invalid Base URL/Partner ID