Skip to main content

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

AttributesDefinitionFormatNotes
newStatusThe 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".
loyaltyIdUnique identifier for the card.StringOptional, may be given in request

Response

AttributesDefinitionFormatNotes
messageProvides a message about a successful operation to change the card status.StringFor instance, when successful: "Card status updated successfully."

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestError: Invalid status specified!INVALID_REQUESTThe status provided is not a valid card status. Check for typos.
400 Bad RequestError: Cannot change the status of a Cancelled cardINVALID_REQUESTAs a security measure, the status cannot be changed for a card that was previously set to Cancelled.
400 Bad RequestError: Cannot change the status of a Damaged cardINVALID_REQUESTAs a security measure, the status cannot be changed for a card that was previously set to Damaged.
400 Bad RequestError: Cannot change the status of a Lost or Stolen cardINVALID_REQUESTAs a security measure, the status cannot be changed for a card that was previously set to Lost or Stolen.
401 UnauthorizedAccount status is CLOSED.API_VALIDATIONCannot change card status for an account that is CLOSED.

Request

Responses

400 - Invalid Status Specified