listCreditCards
get
/ccagent/v1/profiles/{id}/creditCards
Gets the list of credit cards associated with the shopper and its organization
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
User profile id
Query Parameters
-
allCards(optional): boolean
This value is set to true, if inactive cards are also expected in the response.
-
allGateways(optional): boolean
This value is set to true, if the cards from disabled gateways are also expected in the response.
-
allSites(optional): boolean
This value is set to true, if the cards from non-current site are also expected in the response.
Header Parameters
-
X-CCAsset-Language(optional): string
The asset language of the request.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when the operation succeeds.
Root Schema : listCreditCards_response
Type:
Show Source
object
-
items(optional):
array items
Credit card related properties
-
limit(optional):
integer
The batch size of the records to be fetched together.
-
offset(optional):
integer
The start index of the list of records to be fetched
-
total(optional):
integer
The total results fetched.
-
totalResults(optional):
integer
The total results fetched.
Nested Schema : items
Type:
Show Source
object
-
cardNumber(optional):
string
The masked card number.
-
cardType(optional):
string
The type of the card.
-
expiryMonth(optional):
string
The expiry month for the card. Value lies between 01-12.
-
expiryYear(optional):
string
The expiry year for the card.
-
hasExpired(optional):
boolean
The flag that indicates if the card can be used or has it expired.
-
iin(optional):
string
The issuer identification number for the card.
-
isDefault(optional):
boolean
The flag that indicates if the card is the default card for the current user.
-
nameOnCard(optional):
string
The name on the card.
-
nickname(optional):
string
The nick name for the card.
-
repositoryId(optional):
string
The repository id for the card.
-
savedCardId(optional):
string
The card id for the saved credit card.
Example Response (application/json)
{
"total":3,
"totalResults":3,
"offset":0,
"limit":250,
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/profiles/{id}}/creditCards?allCards=true&allGateways=true&allSites=true"
}
],
"items":[
{
"savedCardId":"usercc10001",
"hasExpired":false,
"isDefault":false,
"nameOnCard":"card1",
"repositoryId":"usercc10001",
"expiryMonth":"04",
"cardType":"visa",
"nickname":"visa - 1111",
"expiryYear":"2021",
"cardNumber":"xxxxxxxxxxxx1111",
"iin":"411111"
},
{
"savedCardId":"usercc10002",
"hasExpired":false,
"isDefault":false,
"nameOnCard":"card2",
"repositoryId":"usercc10002",
"expiryMonth":"03",
"cardType":"visa",
"nickname":"visa - 1111##0",
"expiryYear":"2021",
"cardNumber":"xxxxxxxxxxxx1111",
"iin":"411111"
},
{
"savedCardId":"usercc10003",
"hasExpired":false,
"isDefault":true,
"nameOnCard":"card3",
"repositoryId":"usercc10003",
"expiryMonth":"02",
"cardType":"visa",
"nickname":"visa - 1111##1",
"expiryYear":"2020",
"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|
|------------------|------------------|
|28386|An error occurred while retrieving the credit card list.|
|28387|An error occurred while processing the credit card list.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code