--- swagger: "2.0" info: title: CRDS-CSO-D-CardOffers description: The Micrservice is used to keep track of the offers on the transactions of customer's credit card version: 1.0.0 x-ibm-name: crds-cso-d-cardoffers host: 127.0.0.1 schemes: - https basePath: /api produces: - application/json paths: /v1/cards/accounts/transactions/offers/retrieve: post: tags: - retrieve-offers operationId: retrieve-offers summary: The API retrieves the availale offers for a customer based upon his card account and its transactions description: The API retrieves the availale offers for a customer based upon his card account and its transactions 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 sent by Consumer - name: retrieveOffersRequest in: body schema: $ref: '#/definitions/RetrieveOffersRequest' responses: 200: description: Successful operation. schema: $ref: '#/definitions/RetrieveOffersResponse' 400: description:
TypeCodeDetails
errorinvalidRequestMissing or invalid Parameters
schema: $ref: '#/definitions/ErrorResponse' 401: description:
TypeCodeDetails
errorunAuthorizedAuthorization credentials are missing or invalid
schema: $ref: '#/definitions/ErrorResponse' 403: description:
TypeCodeDetailsMore Info
erroraccessNotConfiguredThe request operation is not configured to access this resourceChannel/Country/Business provided in the request is not supported currently
schema: $ref: '#/definitions/ErrorResponse' 404: description:
TypeCodeDetailsMore Info
errorresourceNotFoundThe requested resource was not foundEmpty resource/resource not found
schema: $ref: '#/definitions/ErrorResponse' 422: description:
TypeCodeDetails
errorbusinessValidationFailedBusiness validation error occured on one or more parameters
schema: $ref: '#/definitions/ErrorResponse' 500: description:
TypeCodeDetails
fatalserverUnavailableThe request failed due to an internal error/server unavailability
schema: $ref: '#/definitions/ErrorResponse' /v1/cards/accounts/transactions/offers/accept-offer: post: tags: - accept-offer operationId: accept-offer summary: The API helps the customer to accept and offer on his card description: The API helps the customer to accept and offer on his card 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 sent by Consumer - name: acceptOfferRequest in: body schema: $ref: '#/definitions/AcceptOfferRequest' responses: 200: description: Successful operation. 400: description:
TypeCodeDetails
errorinvalidRequestMissing or invalid Parameters
schema: $ref: '#/definitions/ErrorResponse' 401: description:
TypeCodeDetails
errorunAuthorizedAuthorization credentials are missing or invalid
schema: $ref: '#/definitions/ErrorResponse' 403: description:
TypeCodeDetailsMore Info
erroraccessNotConfiguredThe request operation is not configured to access this resourceChannel/Country/Business provided in the request is not supported currently
schema: $ref: '#/definitions/ErrorResponse' 404: description:
TypeCodeDetailsMore Info
errorresourceNotFoundThe requested resource was not foundEmpty resource/resource not found
schema: $ref: '#/definitions/ErrorResponse' 422: description:
TypeCodeDetails
errorbusinessValidationFailedBusiness validation error occured on one or more parameters
schema: $ref: '#/definitions/ErrorResponse' 500: description:
TypeCodeDetails
fatalserverUnavailableThe request failed due to an internal error/server unavailability
schema: $ref: '#/definitions/ErrorResponse' definitions: RetrieveOffersRequest: type: object properties: customerId: description: unique identifier of the customer type: string example: "123456789012" campaignId: description: campaign id of the offer type: string example: "12345678" waveId: description: wave id of the offer type: string example: "12345678" cardIdentifier: description: reference of the card in the mobile database type: string example: "12345" required: - customerId RetrieveOffersResponse: type: object properties: customer: $ref: '#/definitions/Customer' Customer: type: object properties: customerId: description: unique identifier of the customer type: string example: "123456789012" offers: type: array items: $ref: '#/definitions/Offer' required: - customerId Offer: type: object properties: cardIdentifier: description: reference ID of the card in the mobile database type: string example: "12345" campaignId: description: campaign id of the offer type: string example: "12345678" waveId: description: wave id of the offer type: string example: "12345678" transactionDescription: description: transaction detail/transaction amount type: string example: "50.00" transactionDate: description: date of the transaction type: string format: date example: 2019/12/26 transactionAuthorizationCode: description: authorization code of the transaction type: string example: "123456" internalCounter: description: transaction internal counter type: integer example: 23 isOfferIndicator: description: field used to identify the offer type: string example: AFEWS interestRate: description: interest rate of to the offer type: integer format: double example: 20 merchantName: description: person by whom a contract of carriage of goods has been concluded with type: string example: Walmart validityDate: description: last date of wich the offer is valid type: string format: date example: 2019/12/28 minimumLoanAmount: description: minumum amount applicable to the offer type: number format: double example: 100.500000 maximumLoanAmount: description: maximum amount applicable to the offer type: number format: double example: 25500 displayCardNumber: description: last four digits of the card number type: string example: 1234 totalAnnualCost: description: CAT or total annual cost percentage on the card type: number format: double example: 12.600000 loanArray: description: List of the transactions with detail. type: array items: $ref: '#/definitions/LoanArray' required: - customerId - campaignId - transactionDescription - interestRate - merchantName - validityDate - displayCardNumber LoanArray: type: object properties: loanTenure: description: Number of periods to defer the amount type: integer example: 3 loanAmount: description: Amount of the loan type: number format: double example: 1234.560000 AcceptOfferRequest: type: object properties: offer: $ref: '#/definitions/OfferDetail' OfferDetail: type: object properties: campaignId: description: campaign id of the offer type: string example: "13764237" waveId: description: wave id of the offer type: string example: "7625123768" customerId: description: unique identifier of customer type: string example: "123456789012" cardIdentifier: description: reference ID of the card in the mobile database type: string example: "12345" loanTenure: description: period of loan type: integer format: int32 example: 3 offerStatus: description: status of offer type: string example: L transactionAmount: description: amount of transaction for the offer type: number format: double example: 1234.460000 required: - campaignId - customerId - loanTenure - offerStatus - transactionAmount - cardIdentifier 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: More Info can be used to pass any additional details 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 ...