Change Card Status
PUT/client/users/:correlation_id/card/:loyalty_id/status
Used to change the card status.
Notes:
-
If the card is allocated to another account, the request is rejected (different loyalty id provided for change status call and start session call).
-
If the given loyaltyId is the primary card, LoyaltyStatus will be updated along with card status.
-
The above scenarios work for t1 (inTransition = true) and t2 (inTransition =false) period.
-
If the loyaltyId sent as identifier in the Session Start call is not valid (is not in the database), a ghost account is created, and then updating card status is performed.
Request
Body
| Attributes | Definition | Format | Notes |
|---|---|---|---|
| newStatus | The new status to which the card will be set. | Enum: "ACTIVE", "FRAUD_ABUSE", "LOST_OR_STOLEN", "CANCELLED", or "DAMAGED, SUSPENDED". | Status cannot be updated if current status is "LOST_OR_STOLEN", "CANCELLED", or "DAMAGED". |
| loyaltyId | Unique identifier for the card. | String | Optional, may be given in request |
Response
| Attributes | Definition | Format | Notes |
|---|---|---|---|
| message | Provides a message about a successful operation to change the card status. | String | For instance, when successful: "Card status updated successfully." |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Error: Invalid status specified! | INVALID_REQUEST | The status provided is not a valid card status. Check for typos. |
| 400 Bad Request | Error: Cannot change the status of a Cancelled card | INVALID_REQUEST | As a security measure, the status cannot be changed for a card that was previously set to Cancelled. |
| 400 Bad Request | Error: Cannot change the status of a Damaged card | INVALID_REQUEST | As a security measure, the status cannot be changed for a card that was previously set to Damaged. |
| 400 Bad Request | Error: Cannot change the status of a Lost or Stolen card | INVALID_REQUEST | As a security measure, the status cannot be changed for a card that was previously set to Lost or Stolen. |
| 401 Unauthorized | Account status is CLOSED. | API_VALIDATION | Cannot change card status for an account that is CLOSED. |
Request
Responses
- 400
- 401
- default
400 - Invalid Status Specified
401 - Account Status is Closed
Response Headers
Content-Length
Example:
39Connection
Example:
keep-aliveDate
Example:
Thu, 29 Sep 2022 14:43:05 GMTx-amzn-RequestId
Example:
30ba166d-da0e-4d92-b570-054040ec06c2Referrer-Policy
Example:
no-referrerX-XSS-Protection
Example:
1;mode=blockAccess-Control-Allow-Origin
Example:
*MCK-APPID
Example:
ES-CS-V1MCK-MSGID
Example:
mck-920b9070-8b11-47d5-a26a-641a81e84737Expect-CT
Example:
max-age=86400Strict-Transport-Security
Example:
max-age=31536000; includeSubDomains; preloadFeature-Policy
Example:
vibrate 'none'; geolocation 'none'X-Frame-Options
Example:
sameoriginContent-Security-Policy
Example:
connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netMCK-MSGTIMESTAMP
Example:
September 29th 2022, 2:43:04x-amz-apigw-id
Example:
ZOhGxEnsIAMFpJg=Cache-Control
Example:
no-cache, no-store, must-revalidateMCK_CORRELATIONID
Example:
CORRELATION_ID_NOT_PROVIDED_IN_REQUESTX-Content-Type-Options
Example:
nosniffX-Amzn-Trace-Id
Example:
Root=1-6335aef7-5dcacca052d1282852cc708e;Sampled=0X-Cache
Example:
Miss from cloudfrontVia
Example:
1.1 fff6a70a81914898c2756daea39344e8.cloudfront.net (CloudFront)X-Amz-Cf-Pop
Example:
IAD79-C2X-Amz-Cf-Id
Example:
vSUeUi6yzsps0TIwLEJ0wE3aCHaTGa1Kzz-eKFCk380BFTjext7d9Q==200 - Card Status Changed