---
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 add, authorize, inquire or cancel corresponding to the precreated cards.
version: 1.0.0
title: crds-ccc-o-card-batch-request
x-ibm-name: crds-ccc-o-card-batch-request
host: 127.0.0.1
basePath: /api
schemes:
- https
produces:
- application/json
paths:
/v1/cards/batches/request:
post:
tags:
- create-card-batch-request
operationId: create-card-batch-request
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 add a request for debit or
credit cards corresponding to the precreated cards.
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: createCardBatchRequest
required: true
schema:
$ref: '#/definitions/CreateCardBatchRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/CreateCardBatchResponse'
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/batches/requests/authorization:
post:
tags:
- authorization-card-batch-request
operationId: authorization-card-batch-request
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 authorize a request for debit
or credit cards corresponding to the precreated cards.
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: authorizationCardBatchRequest
required: true
schema:
$ref: '#/definitions/AuthorizationCardBatchRequest'
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/batches/requests/cancellation:
post:
tags:
- cancellation-card-batch-request
operationId: cancellation-card-batch-request
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 cancel a request for debit
or credit cards corresponding to the precreated cards.
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: cancellationCardBatchRequest
required: true
schema:
$ref: '#/definitions/CancellationCardBatchRequest'
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/batches/requests/retrieve:
post:
tags:
- retrieve-card-batch-request
operationId: retrieve-card-batch-request
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 inquiry to bring the information
of a request for debit or credit cards corresponding to the precreated cards.
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: retrieveCardBatchRequest
required: true
schema:
$ref: '#/definitions/RetrieveCardBatchRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/RetrieveCardBatchResponse'
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:
CreateCardBatchRequest:
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"
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
productId:
description: Unique Identifier of the plastic card for example 607 - 'Simplicity',
620 - 'Citi Rewards'
maxLength: 3
type: string
example: "607"
batchCardCount:
description: Ammount of cards that are going to be processed or required.
type: integer
format: int32
example: 1234
agentId:
description: Executive number that request the special package SOEID
maxLength: 12
type: string
example: il90164
required:
- cardTypeCode
- embossedProductCode
- branchName
- productId
- batchCardCount
- agentId
CreateCardBatchResponse:
type: object
properties:
batchReferenceNumber:
description: Unique refrence number to identify the operation for the request
of precreated cards. It is generated by the folio operation service, used for
tracking.
maxLength: 6
type: string
example: "123456"
AuthorizationCardBatchRequest:
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"
batchReferenceNumber:
description: Unique refrence number to identify the operation for the request
of precreated cards. It is generated by the folio operation service, used for
tracking.
maxLength: 6
type: string
example: "123456"
agentId:
description: Executive number that request the special package SOEID
maxLength: 12
type: string
example: il90164
required:
- batchReferenceNumber
- agentId
CancellationCardBatchRequest:
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"
batchReferenceNumber:
description: Unique refrence number to identify the operation for the request
of precreated cards. It is generated by the folio operation service, used for
tracking.
maxLength: 6
type: string
example: "123456"
agentId:
description: Executive number that request the special package SOEID
maxLength: 12
type: string
example: il90164
cancellationReasons:
type: array
items:
$ref: '#/definitions/CancellationReason'
CancellationReason:
type: object
properties:
cancellationReasonDescription:
description: Reason for Case Cancellation For example- Duplicate Case- Customer
Driven Cancellation
maxLength: 60
type: string
example: Cancellation by repetition of process
RetrieveCardBatchRequest:
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"
batchReferenceNumber:
description: Unique refrence number to identify the operation for the request
of precreated cards. It is generated by the folio operation service, used for
tracking.
maxLength: 6
type: string
example: "123456"
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
agentId:
description: Executive number that request the special package SOEID
maxLength: 12
type: string
example: il90164
pagination:
$ref: '#/definitions/Pagination'
required:
- batchReferenceNumber
- branchName
- agentId
RetrieveCardBatchResponse:
type: object
properties:
batchs:
type: array
items:
$ref: '#/definitions/Batch'
pagination:
$ref: '#/definitions/Pagination'
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
nextRecordId:
description: This field will provide or request the next record for pagination
and for better display.
type: integer
format: int32
example: 12345
Batch:
type: object
properties:
batchReferenceNumber:
description: Unique refrence number to identify the operation for the request
of precreated cards. It is generated by the folio operation service, used for
tracking.
maxLength: 6
type: string
example: "123456"
branchName:
description: Name of the Branch or the Sales Unit
maxLength: 32
type: string
example: Sucursal Acapulco
batchCardCount:
description: Ammount of cards that are going to be processed or required.
type: integer
format: int32
example: 1234
batchTypeCode:
description: Card Batch type. Used for Inquiry Only(functionCode = 'I'). Possible
values 00 = Default, 01 = Automatic, 02 = Manual, 03 = Transfer
type: string
example: "01"
requestStatusCode:
description: Status of the request. Possible Values:01= Pending, 02= Authorized,
03= Cancelled
type: string
example: "01"
agentId:
description: Executive SOEID number that request the card batch
maxLength: 12
type: string
example: il90164
authorizeAgentId:
description: 'Executive SOEID number that authorize the request. '
maxLength: 12
type: string
example: il90164
cancelAgentId:
description: Executive SOEID number that request the card batch cancellation
maxLength: 12
type: string
example: il90164
authorizationDate:
description: Authorization date is the date when a transaction is approved.
Format YYYY-MM-DD
type: string
format: date-time
example: "2017-07-21T17:32:28Z"
creationDate:
description: Date on which the batch is requested. Format YYYY-MM-DD
type: string
format: date-time
example: "2017-07-21T17:32:28Z"
processingDate:
description: Date on which the batch is processed. Format YYYY-MM-DD
type: string
format: date-time
example: "2017-07-21T17:32:28Z"
cancellationDate:
description: Date on which the transaction is cancelled. Format YYYY-MM-DD
type: string
format: date-time
example: "2017-07-21T17:32:28Z"
batchTrackNumber:
description: Number of the Card batch that exist for the request which is
already processed
type: string
example: "74587"
batchStatusCode:
description: Status of Card Batch if already created for req id :Pending,
Authorised,Expired, Lost, Damaged, Cancelled Possible values:01=PENDING,02=AUTHORIZED,03=EXPIRED,04=LOST,05=DAMAGED,06=CANCELLED,07=TRANSFERED,08=STOLEN
type: string
example: "01"
originBatchReferenceNumber:
description: This field will retrieve the information the origin batch reference
Number when the batch is going to be transfered from which reference is
being transfered.
type: string
maxLength: 6
example: "123456"
totalCount:
description: Number of the available plastics in the Branch that can be used
to open an account.
type: integer
format: int32
example: 123
cardPlastic:
$ref: '#/definitions/CardPlastic'
cancellationReasons:
type: array
items:
$ref: '#/definitions/CancellationReason'
CardPlastic:
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"
cardShipment:
$ref: '#/definitions/CardShipment'
CardShipment:
type: object
properties:
deliveryBranch:
description: Name of the Branch or the Sales Unit that will be transfered
maxLength: 32
type: string
example: Sucursal Acapulco
expectedDeliveryDayCount:
description: Number of day permit pre-created card transfer
type: integer
format: int32
example: 1
deliveryRemarks:
type: array
items:
$ref: '#/definitions/DeliveryRemark'
DeliveryRemark:
type: object
properties:
deliveryRemarkDescription:
description: Description that explains the reason of why the request is being
transfered to another branch.
maxLength: 60
type: string
example: Transfered due to the branch needs more cards
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
...