---
swagger: "2.0"
info:
title: Card Plastic Microservice
description: ' API for Card Plastic Microservice'
version: 1.1.2
x-ibm-name: card-plastic-microservice
schemes:
- https
basePath: /api
produces:
- application/json
paths:
/v1/cards/plastic/{customerId}:
get:
tags:
- CardPlasticDetails
summary: This API is to retrieve Customer Card Plastic Information
description: This API is to retrieve Customer Card Plastic Information. The
scope of this API is Public, Entry-Point and Post-Login.
consumes:
- application/json
produces:
- application/json
parameters:
- name: Accept
in: header
description: Content-Types that are acceptable for the response
type: string
required: true
- name: Accept-Language
in: header
description: List of acceptable human languages for response
type: string
required: false
- name: Authorization
in: header
description: The Authorization Token recieved during login
type: string
required: true
- name: client_id
in: header
required: true
type: string
description: Client ID generated during application registration
- name: Content-Type
in: header
description: Content-Types that are sent in the request
required: true
type: string
- name: uuid
in: header
description: 128 bit UUID that you generate for every request
type: string
required: true
- name: sid
in: header
description: SessionId sent by Consumer
required: true
type: string
- in: path
name: customerId
description: Request body corresponding to get Card plastic details
required: true
type: string
- in: query
name: fetchCardDetails
description: Type of card details to be fetched Debit, Credit or Both
enum:
- CREDIT
- DEBIT
- BOTH
required: true
type: string
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/GetCardPlasticResponse'
400:
description:
Type | Code | Details |
error | invalidRequest | Missing
or invalid Parameters |
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 | More
Info |
error | accessNotConfigured | The request
operation is not configured to access this resource | Channel/Country/Business
provided in the request is not supported currently |
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'
500:
description: Type | Code | Details |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
/v1/cards/plastic/pin:
put:
tags:
- CardPlasticPinSet
summary: This API is to set Customer Card Plastic Pin
description: This API is to set Customer Card Plastic Pin
consumes:
- application/json
produces:
- application/json
parameters:
- name: Accept
in: header
description: Content-Types that are acceptable for the response
type: string
required: true
- name: Accept-Language
in: header
description: List of acceptable human languages for response
type: string
required: false
- name: Authorization
in: header
description: The Authorization Token recieved during login
type: string
required: true
- name: client_id
in: header
required: true
type: string
description: Client ID generated during application registration
- name: Content-Type
in: header
description: Content-Types that are sent in the request
required: true
type: string
- name: uuid
in: header
description: 128 bit UUID that you generate for every request
type: string
required: true
- name: sid
in: header
description: SessionId sent by Consumer
required: true
type: string
- in: body
name: setCardPlasticPinRequest
description: Request body corresponding to pin set for Card plastic
required: true
schema:
$ref: '#/definitions/SetCardPlasticPinRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/SetCardPlasticPinResponse'
400:
description: Type | Code | Details |
error | invalidRequest | Missing
or invalid Parameters |
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 | More
Info |
error | accessNotConfigured | The request
operation is not configured to access this resource | Channel/Country/Business
provided in the request is not supported currently |
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'
500:
description: Type | Code | Details |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
/v1/cards/plastic/e2ee/pin:
put:
tags:
- card-plastic-e2ee-pinset
operationId: card-plastic-e2ee-pinset
summary: This API is for changing Customer Card Plastic PIN using E2E encryption
description: This API is for changing Customer Card Plastic PIN using E2E encryption
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
required: true
type: string
description: Client ID generated during application registration
- name: Authorization
in: header
required: true
type: string
description: The Authorization Token received during login
- name: Accept
in: header
required: true
type: string
description: Content-Types that are acceptable for the response
- name: uuid
in: header
required: true
type: string
description: 128 bit UUID that you generate for every request
- name: Accept-Language
in: header
required: false
type: string
description: List of acceptable human languages for response
- name: Content-Type
in: header
required: true
type: string
description: Content-Types that are sent in the request
- name: ChannelId
in: header
required: true
type: string
description: Channel where request originated
- name: sid
in: header
required: true
type: string
description: Sessionid value from E2EE Key Exchange response
- name: cardPINChangeRequest
in: body
schema:
$ref: '#/definitions/CardPINChangeRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/CardPINChangeSetResponse'
400:
description: Type | Code | Details |
error | invalidRequest | Missing
or invalid Parameters |
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 | More
Info |
error | accessNotConfigured | The request
operation is not configured to access this resource | Channel/Country/Business
provided in the request is not supported currently |
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 |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
SetCardPlasticPinRequest:
properties:
encryptionKeyVersion:
description: version of the encryption of key
type: string
example: "2.0"
cardPlasticDetails:
type: array
items:
$ref: '#/definitions/CardPlasticDetails'
SetCardPlasticPinResponse:
properties:
cardNumber:
description: Card Number belonging to the customer
type: string
example: "1234567887654321"
folioId:
description: folio id generated
type: string
example: "00001"
pinChangeFlag:
description: Pin change Flag
type: boolean
example: true
pinChangeMessage:
description: Pin change Message
type: string
example: pin changes successfully
GetCardPlasticResponse:
type: object
description: 'Get Card Plastic Details '
properties:
cardPlastic:
type: array
items:
$ref: '#/definitions/CardPlastic'
subCardType:
description: Define if the customer has only Debit (D) or Credit (C) cards,
or both (M)
type: string
example: M
maxLength: 1
required:
- cardPlastic
CardPlastic:
properties:
activationDate:
description: activationDate
type: string
format: Date
example: "20171226"
activationTimestamp:
description: activation timestamp
type: string
format: Datetime
example: "1996-12-19T16:39:57-08:00"
applicationInterchangeProfileValue:
description: Application Inter change profile of the plastic. This information
will be logged in cards host as part of authorization
type: string
example: "5800"
cardActivationIndicator:
type: string
description: Indicator for card active or inactive
example: "Y"
cardLockedFlag:
description: isCardLocked
type: boolean
example: true
cardNickname:
description: cardNickname
type: string
example: Wife's Card
cardNumber:
description: Card Number belonging to the customer
type: string
example: "1234567887654321"
cardDataStatus:
description: status of data responded by backend
type: string
example: "00"
cardStatus:
description: card Data Status
type: string
example: ACTIVE
cardType:
description: Indicates whether the card is credit card or debit card
type: string
enum:
- CREDIT
- DEBIT
example: DEBIT
expiryDate:
description: Expiry Date Of Card (Credit/Debit)
type: string
format: Date
example: "20171226"
lastApplicationInterchangeProfile:
description: The last AIP indicates which previous processing steps (e.g.
cardholder verification, data authentication) are supported and which should
be applied to the current transaction.
type: string
example: "5800"
lastCardActivationIndicator:
type: string
description: Last indicator for card active or inactive
example: "N"
lastCardUpdateDate:
description: last card updated date
type: string
format: Date
example: "20171226"
lastExpiryDate:
description: last expiry Date Of Card (Credit/Debit)
type: string
format: Date
example: "20171226"
cardAccount:
$ref: '#/definitions/CardAccount'
pinDetail:
$ref: '#/definitions/PinDetails'
required:
- cardAccount
- pinDetail
CardAccount:
properties:
customerId:
description: unique identifier of the customer
type: string
example: "00012312345"
accountNumber:
description: Account Number belonging to the customer
type: string
example: "00012312345"
accountStatus:
description: status of the account
type: string
example: ACTIVE
creditLimitAmount:
description: creditLimitAmount
type: string
example: "45000"
currencyCode:
description: currencyCode
type: string
example: MXN
lastStatementBalanceAmount:
description: lastStatementBalanceAmount
type: string
example: "15000"
minimumPaymentDueAmount:
description: minimumPaymentDueAmount
type: string
example: "15000"
outstandingBalanceAmount:
description: outstandingBalanceAmount
type: string
example: "15000"
paymentDueDate:
description: paymentDueDate
type: string
example: "20171226"
productId:
description: productId
type: integer
example: 1234
productName:
description: product name
type: string
example: GOLD
productInstrument:
description: productInstrument
type: integer
example: 50
accountCreationDate:
description: registrationDate
type: string
format: Date
example: "20171226"
PinDetails:
properties:
cardPinOfflineStatus:
description: Indicator to show card PIN Offline Status of the card
type: string
example: ACTIVE
lastCardPinOfflineStatus:
description: Indicator to show last card PIN Offline Status of the card
type: string
example: ACTIVE
pinFailedCount:
description: Count of wrong Pin entered
type: number
format: int
example: 2
lastPinFailedCount:
description: last count of wrong Pin entered
type: number
format: int
example: 2
pinOfflineEnabledDate:
description: Pin offline enable date
type: string
format: Date
example: "20171226"
pinSynchronizationStatus:
description: Whether the offline PIN and Online PIN is in sync for the plastic
type: string
example: "1"
pinSynchronizationDate:
description: pinSynchronizationDate-DEBIT
type: string
format: Date
example: "20171226"
pinSynchronizationTimestamp:
description: pinSynchronizationHour-DEBIT
type: string
format: Datetime
example: "1996-12-19T16:39:57-08:00"
lastPinSynchronizationStatus:
description: Whether the last offline PIN and last Online PIN is in sync for
the plastic
type: string
example: "1"
CardPlasticDetails:
properties:
cardNumber:
description: Card Number belonging to the customer
type: string
example: "1234567887654321"
cardType:
description: Card Type decided in the microservice. Debit/Credit
type: string
example: DEBIT
accountDetails:
$ref: '#/definitions/AccountDetails'
pinInformation:
$ref: '#/definitions/PinInformation'
required:
- accountDetails
- pinInformation
AccountDetails:
properties:
customerId:
description: Unique Identifier of the customer
type: number
format: int
example: 63743
PinInformation:
properties:
encryptedPinNumber:
description: Pin number of the Card
type: string
example: "3256"
encryptedOldPinNumber:
description: Old pin number of the Card
type: string
example: "3562"
required:
- encryptedPinNumber
CardPINChangeRequest:
type: object
properties:
encryptionTypeVersion:
description: Version of the encryption key
type: string
example: "1.0"
cardPlastic:
$ref: '#/definitions/CardPlasticInformation'
required:
- encryptionTypeVersion
CardPlasticInformation:
type: object
properties:
cardNumber:
description: Card number
type: string
example: "4545232356561212"
maxLength: 16
pattern: ^[0-9]{16}$
cardType:
description: Card Type. Debit/Credit
type: string
enum:
- CREDIT
- DEBIT
pin:
$ref: '#/definitions/PIN'
account:
$ref: '#/definitions/Account'
required:
- cardNumber
- cardType
PIN:
type: object
properties:
encryptedNewPINNumber:
description: Encrypted PIN Value. This is encrypted by the frontends with
the E2E encryption specifications shared trough POST /security/e2e/key API.
The encoding used here should be HEX.
type: string
example: 7E706C6D9555D765C247C068F95374F0
encryptedOldPINNumber:
description: Encrypted PIN Value. This is encrypted by the frontends with
the E2E encryption specifications shared trough POST /security/e2e/key API.
The encoding used here should be HEX.
type: string
example: 65C247C068F95374F07E706C6D9555D7
required:
- encryptedNewPINNumber
Account:
type: object
properties:
customerId:
description: Customer Id
type: string
example: "63743"
maxLength: 16
required:
- customerId
CardPINChangeSetResponse:
type: object
properties:
cardNumber:
description: Card number
type: string
example: "4545232356561212"
maxLength: 16
pinDetails:
$ref: '#/definitions/PINDetails'
required:
- cardNumber
PINDetails:
type: object
properties:
pinChangeFolioId:
description: Folio generated by the PIN change process
type: string
example: "98732"
pinChangeStatus:
description: Indicates if the PIN change process is done
type: boolean
example: true
pinChangeMessage:
description: PIN change message
type: string
example: PIN changed successfully
required:
- pinChangeStatus
- pinChangeMessage
ErrorResponse:
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:
description: Error code which qualifies the error
type: string
details:
description: Human readable explanation specific to the occurrence of the
problem
type: string
location:
description: The name of the field that resulted in the error
type: string
moreInfo:
description: URI to human readable documentation or detailed description of
the error
type: string
uuid:
description: 128 bit UUID that you generate for every request
type: string
timestamp:
description: Timestamp of the error
type: string
required:
- type
- code
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
...