Reissue Card
Request URL
POST /card/:AFiCardId/reissue
Description
This endpoint reissues a card when the existing card is lost, damaged or stolen. The card is identified by a path parameter. The reason for the reissue is given in the request body and can be either "lost" or "stolen".
If the reason is "stolen", then the card will be given a new number. The reissue reason "lost" means that the card will have the same card number, but it may get a different expiration date. Unless the card number was compromised one way or another, use "lost".
Schema
Property table for card/:AFiCardId/reissue
Property | Description | Required | Schema |
---|---|---|---|
AFiCardId | ampliFi ID for the card | Yes | { "type": "string" } |
isSamePAN | isSamePAN | No | { "type": "boolean", "default": false } |
Request Body
Snippet Examples
javascript
const axios = require('axios');
const data = {
"reason": "stolen"
};
const config = {
method: 'POST',
url: '${AMPLIFI_BASE_URL}/card/:AFiCardId/reissue',
headers: {
'Content-Type': "application/json",
'token': "A long random string token received from /token request"
},
data
};
let result;
try {
result = await axios.request(config);
if (result.status === 200) {
console.log(JSON.stringify(result.data));
}
} catch (err) {
console.log({
errCode: err.code,
responseStatus: err.response && err.response.status,
data: err.response && JSON.stringify(err.response.data)
});
}
cURL
curl --location "AMPLIFI_BASE_URL/card/:AFiCardId/reissue" --data "{ \"reason\":\"stolen\"}" --header "Content-Type: application/json" --header "token: A long random string token received from /token request"
Successful Response Examples
200 CARD/:AFICARDID/REISSUE SUCCESSFUL RESPONSE REISSUING CARD
HEADERS
Header | Value |
---|---|
Content-Type | application/json |
token | A long random string token received from /token request |
PARAMETERS
Parameter | Description | Value |
---|---|---|
AFiCardId | [required] | qwegalq11xn6prxjp |
REQUEST BODY
RESPONSE BODY