---
swagger: "2.0"
info:
description: This microservice decides if the request is from a debit or a credit
card and it will call to the corresponding domain to trigger the functionality
of enroll new products, update products, retrieve information about product list
or delete products.
version: 1.0.0
title: crds-ccc-o-card-product-request
x-ibm-name: crds-ccc-o-card-product-request
host: 127.0.0.1
basePath: /api
schemes:
- https
produces:
- application/json
paths:
/v1/cards/products/branches/enrollment:
post:
tags:
- card-product-branch-enrollment
operationId: card-product-branch-enrollment
summary: LOB:Cards; Feature:Batch Request Debit and Credit Cards; Functionality:Create
description: This API depending on the classification, whether it is a debit
or credit card, will trigger the funcionality of enroll new products.
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
description: Client ID generated during application registration
required: true
type: string
- name: Authorization
in: header
description: The Authorization Token received during login
required: true
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: createCardProductRequest
required: true
schema:
$ref: '#/definitions/CreateCardProductRequest'
responses:
204:
description: Successful operation.
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'
put:
tags:
- update-card-product-branch-enrollment
operationId: update-card-product-branch-enrollment
summary: LOB:Cards; Feature:Batch Request Debit and Credit Cards; Functionality:Authorization
description: This API depending on the classification, whether it is a debit
or credit card, will trigger the funcionality of update existing products.
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
description: Client ID generated during application registration
required: true
type: string
- name: Authorization
in: header
description: The Authorization Token received during login
required: true
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: updateCardProductRequest
required: true
schema:
$ref: '#/definitions/UpdateCardProductRequest'
responses:
204:
description: Successful operation.
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'
/v1/cards/products/branches/enrollment/delete:
put:
tags:
- delete-card-product-branch-enrollment
operationId: delete-card-product-branch-enrollment
summary: 'LOB:Cards; Feature: Batch Request Debit and Credit Cards; Functionality:Cancellation'
description: This API depending on the classification, whether it is a debit
or credit card, will trigger the funcionality of delete existing products.
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
description: Client ID generated during application registration
required: true
type: string
- name: Authorization
in: header
description: The Authorization Token received during login
required: true
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: deleteCardProductRequest
required: true
schema:
$ref: '#/definitions/DeleteCardProductRequest'
responses:
204:
description: Successful operation.
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'
/v1/cards/products/branches/enrollment/retrieve:
post:
tags:
- retrieve-card-product-branch-enrollment
operationId: retrieve-card-product-branch-enrollment
summary: LOB:Cards; Feature:Batch Request Debit and Credit Cards; Functionality:retrieve
description: This API depending on the classification, whether it is a debit
or credit card, will trigger the funcionality of retrieve information about
product list.
consumes:
- application/json
produces:
- application/json
parameters:
- name: client_id
in: header
description: Client ID generated during application registration
required: true
type: string
- name: Authorization
in: header
description: The Authorization Token received during login
required: true
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: retrieveCardProductInfoRequest
required: true
schema:
$ref: '#/definitions/RetrieveCardProductInfoRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/RetrieveCardProductInfoResponse'
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:
CreateCardProductRequest:
type: object
properties:
branchTypeCode:
description: 'Code to define whether the product is created at the branch
or sales unit level. For example: B: branch S: Sales'
maxLength: 1
type: string
example: B
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
cardTypeCode:
description: This field will recover the ID from the cards where values will
be '322' if it´s Credit or '321' if it's Debit.
maxLength: 3
type: string
example: "322"
embossedProductCode:
description: This field will send the Number of the Product of the card for
example 994 that means 'Simplicity', 941 that means 'Teleton'
maxLength: 3
type: string
example: "994"
productId:
description: Unique Identifier of the plastic card for example 607 - 'Simplicity',
620 - 'Citi Rewards'
maxLength: 3
type: string
example: "607"
stockProvidePercentage:
description: Percentage in which a new supply of cards must be generated for
the branch
type: number
format: double
example: 50.150000
initialStockCount:
description: Number of cards in the initial request
type: integer
format: int32
example: 123456
monthsSinceCardExpirationNumber:
description: Number of months before the card expires and can be assigned
to a customer
type: integer
format: int32
example: 12
required:
- branchTypeCode
- branchName
- cardTypeCode
- embossedProductCode
- productId
- stockProvidePercentage
- initialStockCount
- monthsSinceCardExpirationNumber
UpdateCardProductRequest:
type: object
properties:
branchTypeCode:
description: 'Code to define whether the product is created at the branch
or sales unit level. For example: B: branch S: Sales'
maxLength: 1
type: string
example: B
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
cardTypeCode:
description: This field will recover the ID from the cards where values will
be '322' if it´s Credit or '321' if it's Debit.
maxLength: 3
type: string
example: "322"
embossedProductCode:
description: This field will send the Number of the Product of the card for
example 994 that means 'Simplicity', 941 that means 'Teleton'
maxLength: 3
type: string
example: "994"
productId:
description: Unique Identifier of the plastic card for example 607 - 'Simplicity',
620 - 'Citi Rewards'
maxLength: 3
type: string
example: "607"
stockProvidePercentage:
description: Percentage in which a new supply of cards must be generated for
the branch
type: number
format: double
example: 50.150000
initialStockCount:
description: Number of cards in the initial request
type: integer
format: int32
example: 123456
monthsSinceCardExpirationNumber:
description: Number of months before the card expires and can be assigned
to a customer
type: integer
format: int32
example: 12
required:
- branchTypeCode
- branchName
- cardTypeCode
- embossedProductCode
- productId
- stockProvidePercentage
- initialStockCount
- monthsSinceCardExpirationNumber
DeleteCardProductRequest:
type: object
properties:
branchTypeCode:
description: 'Code to define whether the product is created at the branch
or sales unit level. For example: B: branch S: Sales'
maxLength: 1
type: string
example: B
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
cardTypeCode:
description: This field will recover the ID from the cards where values will
be '322' if it´s Credit or '321' if it's Debit.
maxLength: 3
type: string
example: "322"
embossedProductCode:
description: This field will send the Number of the Product of the card for
example 994 that means 'Simplicity', 941 that means 'Teleton'
maxLength: 3
type: string
example: "994"
productId:
description: Unique Identifier of the plastic card for example 607 - 'Simplicity',
620 - 'Citi Rewards'
maxLength: 3
type: string
example: "607"
required:
- branchTypeCode
- branchName
- cardTypeCode
- embossedProductCode
- productId
RetrieveCardProductInfoRequest:
type: object
properties:
branchTypeCode:
description: 'Code to define whether the product is created at the branch
or sales unit level. For example: B: branch S: Sales'
maxLength: 1
type: string
example: B
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
pagination:
$ref: '#/definitions/Pagination'
required:
- branchTypeCode
- branchName
RetrieveCardProductInfoResponse:
type: object
properties:
products:
type: array
items:
$ref: '#/definitions/Products'
pagination:
$ref: '#/definitions/Pagination'
Products:
type: object
properties:
cardTypeCode:
description: This field will recover the ID from the cards where values will
be '322' if it´s Credit or '321' if it's Debit.
maxLength: 3
type: string
example: "322"
embossedProductCode:
description: This field will send the Number of the Product of the card for
example 994 that means 'Simplicity', 941 that means 'Teleton'
maxLength: 3
type: string
example: "994"
productId:
description: Unique Identifier of the plastic card for example 607 - 'Simplicity',
620 - 'Citi Rewards'
maxLength: 3
type: string
example: "607"
stockProvidePercentage:
description: Percentage in which a new supply of cards must be generated for
the branch
type: number
format: double
example: 50.150000
initialStockCount:
description: Number of cards in the initial request
type: integer
format: int32
example: 123456
monthsSinceCardExpirationNumber:
description: Number of months before the card expires and can be assigned
to a customer
type: integer
format: int32
example: 12
Pagination:
type: object
properties:
nextBranchName:
description: This field will have the next branch name for pagination and
for better display.
maxLength: 32
type: string
example: Zara Galerias
nextCardTypeCode:
description: This field will recover the ID from the cards where values will
be '322' if it´s Credit or '321' if it's Debit.
maxLength: 3
type: string
example: "322"
nextEmbossedProductCode:
description: This field will send the Number of the Product of the card for
example 994 that means 'Simplicity', 941 that means 'Teleton'
maxLength: 3
type: string
example: "994"
nextProductId:
description: Unique Identifier of the plastic card for example 607 - 'Simplicity',
620 - 'Citi Rewards'
maxLength: 3
type: string
example: "607"
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
...