---
swagger: "2.0"
info:
description: This orchestrating microservice decides if debit or credit card information
is required by sending a call to the corresponding domain to bring the details
of the cards.
version: 1.0.0
title: crds-ccc-o-card-info
x-ibm-name: crds-ccc-o-card-info
host: 127.0.0.1
basePath: /api
schemes:
- https
produces:
- application/json
paths:
/v1/cards/details/retrieve:
post:
tags:
- retrieve-cards-details
operationId: retrieve-cards-details
summary: LOB:Cards; Feature:Debit and Credit Cards; Functionality:Retrieve Info
description: This API depending on the classification, whether it is a debit
or credit card, it will bring the information corresponding to the card.
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
description: Client ID generated during application registration
required: false
type: string
- name: Authorization
in: header
description: The Authorization Token received during login
required: false
type: string
- name: uuid
in: header
description: 128 bit UUID that you generate for every request
required: true
type: string
- name: Accept
in: header
required: true
type: string
description: Content-Types that are acceptable for the response
- name: Accept-Language
in: header
description: List of acceptable human languages for response
required: false
type: string
default: es
- name: ChannelId
in: header
description: Channel where request originated
required: true
type: string
- name: Content-Type
in: header
description: Content-Types that are sent in the request
required: true
type: string
default: application/json
- name: countryCode
in: header
description: Country code in 2 character ISO 3166 format
required: true
type: string
default: MX
- name: businessCode
in: header
description: Business code identified during application registration
required: true
type: string
default: GCB
- name: sid
in: header
description: SessionId sent by Consumer
required: true
type: string
- in: body
name: retrieveCardsDetailsRequest
required: true
schema:
$ref: '#/definitions/RetrieveCardsDetailsRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/RetrieveCardsDetailsResponse'
400:
description:
Type | Code | Details |
error | invalidRequest | Missing or invalid Parameters |
error | cannotDecryptData | 620-Cannot decrypt, please
re-check the encrypted value |
schema:
$ref: '#/definitions/ErrorResponse'
401:
description: Type | Code | Details |
error | unAuthorized | Authorization
credentials are missing or invalid |
schema:
$ref: '#/definitions/ErrorResponse'
403:
description: Type | Code | Details |
error | accessNotConfigured | The request operation
is not configured to access this resource |
error | productNotAllowed | The
card is not allowed to issue CVV2 and 2FA. |
schema:
$ref: '#/definitions/ErrorResponse'
404:
description: Type | Code | Details | More
Info |
error | resourceNotFound | The requested
resource was not found | Empty resource/resource not found |
schema:
$ref: '#/definitions/ErrorResponse'
422:
description: Type | Code | Details |
error | businessValidationFailed | Business
validation error occured on one or more parameters |
schema:
$ref: '#/definitions/ErrorResponse'
500:
description: |-
Type | Code | Details |
error | backendError | Failed
during a call to backend service |
error | timeoutError | Time to complete a transaction is over |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
RetrieveCardsDetailsRequest:
type: object
properties:
customerId:
description: Unique identifier of the customer.
type: string
example: "123456789012"
pattern: ^[0-9]*$
maxLength: 12
subCardTypeCode:
description: Sub Card Type - Credit Card or Debit Card.
type: string
example: C
required:
- customerId
- subCardTypeCode
RetrieveCardsDetailsResponse:
type: object
properties:
cardPlastics:
type: array
items:
$ref: '#/definitions/CardPlastics'
required:
- cardPlastics
CardPlastics:
type: object
properties:
cardNumber:
description: 'A card issued by a bank allowing the holder to transfer money
electronically from one account to another account or another bank account,
for cash withdrawal, for making a purchase etc. '
type: string
example: "1234567890123456"
cardHolderName:
description: Name of the card holder owning the Debit card.
type: string
example: Alex Ignatio
cardBlockCode:
description: 'The block code used to block a particular card.Card Block Codes
are Temp. Block, Lost, Fraud / Stolen, Over Credit Limit For eg: if card
is lost the first step is to block the card to avoid any discrepany like
misuse(Fraud)'
type: string
example: A
newCardNumber:
description: New card number to which it is assigned due to card reporting
(either theft, loss or fraud report).
type: string
example: "9984567890123456"
activationIndicator:
description: 'Indicator of the activation status of the physical plastic card
(N: Not Active, Y: Active, D: Dormand, B:Blocked).'
type: string
example: "Y"
expiryDate:
description: The date on which the card becomes invalid/expired. The customer
can place a request for new card on or before the expiry date of the existing
card plastic.
type: string
format: date
example: "2020-09-22"
maxLength: 10
cardHolderType:
description: Identifies the type of card user such as Primary, Secondary,
Owner, Employee
type: string
example: P
account:
$ref: '#/definitions/AccountResponse'
required:
- cardNumber
- cardHolderName
- cardBlockCode
- newCardNumber
- activationIndicator
- expiryDate
- cardHolderType
AccountResponse:
type: object
properties:
productName:
description: Name of the product.
type: string
example: Costco
accountNumber:
description: 'This attribute holds the customer''s Account Number with the
Bank. '
type: string
example: "9876546789009870"
blockReason:
description: The reason for blocking the card. A.- Voluntary Definitive Cancellation
(A-Voluntary definitive cancellation) B.- Involuntary Definitive Cancellation
(B- Non Voluntary definitive cancellation) O.- Voluntary Precancellation
_ (O- Voluntary Pre cancellation)_ K.- Involuntary Precancellation __ (K-
Non Voluntary Pre cancellation) U.- Upgrade __ (U-Upgrade) V.- VIP (V-VIP)
type: string
example: A Voluntary Definitive Cancellation
additionalBlockReason:
description: Additional description of the blocking code assigned to the card.
A2 - Cancellation for additional card, D1.- Deceased client, D2.- Deceased
client Insurance paid
type: string
example: D2.- Deceased client Insurance paid
required:
- productName
- accountNumber
- blockReason
- additionalBlockReason
ErrorResponse:
required:
- code
- details
- location
- moreInfo
- timestamp
- type
properties:
type:
type: string
description: Invalid - Request did not confirm to the specification and was
unprocessed and rejected. Please fix the value and try again
enum:
- error
- warn
- invalid
- fatal
code:
type: string
description: Error code which qualifies the error
details:
type: string
description: Human readable explanation specific to the occurrence of the
problem
location:
type: string
description: The name of the field that resulted in the error
moreInfo:
type: string
description: URI to human readable documentation of the error
timestamp:
type: string
description: Timestamp of the error
x-ibm-configuration:
enforced: true
testable: true
phase: realized
securityDefinitions:
OAuth2 Application Flow:
type: oauth2
description: ""
flow: application
scopes:
/api/v1: ""
tokenUrl: https://perf.api.externalapib2b.wlb.lac.nsroot.net:7100/mx-gcgapi/perfext/api/v1/oauth/token
Client ID:
type: apiKey
description: ""
in: header
name: X-IBM-Client-Id
security:
- OAuth2 Application Flow:
- /api/v1
Client ID: []
x-ibm-endpoints:
- endpointUrl: https://perf.api.externalapib2b.wlb.lac.nsroot.net:7100/mx-gcgapi/perfext
type:
- production
- development
...