updateCreditCard

put

/ccappagent/v1/profiles/{id}/creditCards/{cardId}

Updates the credit card information for the id, passed in as query parameter, by searching the credit cards associated with the given shopper profile and its organization. Currently, only setAsDefault and nickname fields are allowed to be updated for the saved cards.

Request

Supported Media Types
Path Parameters
  • The id of the credit card, that needs to be searched, in the given shopper profile and its organization.
  • User profile id
Header Parameters
Body ()
Root Schema : updateCreditCard_request
Type: object
Show Source
Example:
{
    "nickname":"Home Card 2",
    "additionalInfo":"Card has been synced with id 10001",
    "setAsDefault":true
}
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when the operation succeeds.
Body ()
Root Schema : updateCreditCard_response
Type: object
Show Source
Example Response (application/json)
{
    "savedCardId":"usercc10002",
    "hasExpired":false,
    "isDefault":true,
    "nameOnCard":"card2",
    "repositoryId":"usercc10002",
    "expiryMonth":"03",
    "cardType":"visa",
    "nickname":"Home Card 2",
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:8080/ccstoreui/v1/profiles/{id}/creditCards/usercc10002"
        }
    ],
    "expiryYear":"2021",
    "cardNumber":"xxxxxxxxxxxx1111",
    "iin":"411111"
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commercer Cloud: |Error Code|Description| |------------------|------------------| |28388|Unable to find credit card for the card id {cardId}.| |28395|User is not authorized to update the credit card with card id {cardId}.| |28392|An error occured while trying to update the credit card with card id {cardId}.| |28391|An error occurred while processing the credit card.|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top