Manage CardLabel and ExtendedData
PUT/client/users/:correlation_id/card/:loyalty_id
Release: ES Loyalty 3.0
-
The API is used to ADD or REPLACE(if already exists) the attributes : "cardLabel" and "extendedData" on card object of specific account.
-
Both the attributes in request body are optional attributes, but one or both must be in the request.
-
If "cardLabel" is sent as an empty string, the attribute is removed from the database.
-
If "extendedData" attribute is send as an empty object, it will replace the current "extendeData" with an empty object.
Request
Body
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| cardLabel | Name/Label for a card | String | Optional attribute, but either this or extendedData must be in the request |
| extendedData | Contains additional data for the card | Object | Optional attribute, but either this or cardLabel must be in the request |
Response
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| Message | "Successfully updated the card." | String |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Error: The card label should be 1-100 characters. Possible characters: a-z, A-Z, 0-9, space, underscore, hyphen, single quote. | INVALID_REQUEST | Card label needs to be in specified size and specific characters are allowed. |
| 400 Bad Request | Error: Please provide CardLabel or ExtendedData | INVALID_REQUEST | Either "cardLabel" or "extendedData" is mandatory in request body. |
| 400 Bad Request | Error: LoyaltyId specified is not associated with this Account | INVALID_REQUEST | The loyaltyId provided in Path Variable needs to be for the same account who is requesting the API. |
Request
Responses
- 400
- default
400 - Invalid cardLabel
200 - Card Updated