Update cards
Create or update cards associated with a customer account.
| PUT /v2/data/customers/:sourceCustomerId/accounts/:sourceAccountId/cards
|
In addition to the path parameters, this endpoint requires a JSON body be posted.
Path Param |
Type |
Description |
sourceCustomerId |
string |
Customer identifier |
accountId |
string |
Account identifier |
Property |
Type |
Required |
Description |
cards |
Card[] |
Required |
Create Card Parameters or Update Card Parameters described below |
Create Card Parameters
Property |
Type |
Required |
Description |
sourceAccountId |
string |
Required |
Account identifier to associate with the card |
sourceCustomerId |
string |
Required |
Customer identifier associated with the account |
last4 |
string |
Required |
Last 4 digits of the card number |
iin |
string |
Required |
Card IIN number |
cardType |
CardType |
Required |
Card type |
status |
CardStatus |
Required |
The status of the new card |
networkIdentifier |
string |
Required |
The first digit of the Plastic Account Number (PAN) as the network Identifier (3-MC, 4-V, 5-D, 6-AXP) |
openDate |
string |
Required |
The date and time the card was opened |
closeDate |
string |
Required, if status is CLOSED |
The date and time the card was closed |
Update Card Status Parameters
Any card properties left out of the response will not be updated.
Property |
Type |
Required |
Description |
sourceAccountId |
string |
Required |
Account identifier to associate with the card |
sourceCustomerId |
string |
Required |
Customer identifier associated with the account |
last4 |
string |
Required |
Last 4 digits of the card number |
cardType |
CardType |
No |
Card type |
status |
CardStatus |
No |
The updated status of the card |
networkIdentifier |
string |
No |
The first digit of the Plastic Account Number (PAN) as the network Identifier (3-MC, 4-V, 5-D, 6-AXP) |
openDate |
string |
No |
The date and time the card was opened |
closeDate |
string |
Required, if status is being updated CLOSED |
The date and time the card was closed |
Output
This endpoint returns an HTTP response indicating success (200) or failure (500).
Example
This example shows one card being created and another being set to CLOSED
.
Request
| PUT /v2/data/customers/:sourceCustomerId/accounts/:sourceAccountId/cards
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 | {
"cards": [
{
"sourceAccountId": "42c57311-25f9-4501-b9db-e78afa73c0e3",
"sourceCustomerId": "afa2r21-25f9-4501-b9db-e78afa73c0e3",
"last4": "2345",
"iin": "123456",
"cardType": "CREDIT",
"status": "OPEN",
"networkIdentifier": 3,
"openDate": "2017-01-01T08:00:00Z",
"closeDate": null
},
{
"sourceAccountId": "42c57311-25f9-4501-b9db-e78afa73c0e3",
"sourceCustomerId": "afa2r21-25f9-4501-b9db-e78afa73c0e3",
"last4": "6789",
"iin": "873452",
"cardType": "CREDIT",
"status": "CLOSED",
"networkIdentifier": 3,
"openDate": "2017-01-01T08:00:00Z",
"closeDate": "2023-04-06T08:00:00Z"
}
]
}
|
Response
| {
"requestId": "380052b4-3a64-4952-b640-ba696eb9f44b"
}
|