openapi: 3.0.3
info:
  title: Mastercard Business Payment Controls
  version: 1.0.0
  description: >-
    Business Payment Controls is an application programming interface (API)
    based solution that simplifies business payments by using configurable
    controls to limit spending on real and virtual cards, while allowing finance
    teams to reconcile payments using transaction-level reporting.
  contact:
    name: API Support
    email: apisupport@mastercard.com
    url: https://developer.mastercard.com/support
servers:
  - url: https://apiedge.mastercard.com/commercial
    description: Production Server
  - url: https://sandbox.apiedge.mastercard.com/commercial
    description: Sandbox Server
tags:
  - name: Entities
    description: >-
      Entities Search - Fetch entity identifiers which can be used to register
      Real Cards at the appropriate hierarchy level
  - name: Real Card
    description: >-
      Real Card Operations - Registering a card, updating, deleting or searching
      registered real cards.
  - name: Contact
    description: >-
      Contact Operations - Linking a contact to a card, updating, deleting or
      searching for contacts associated with real cards.
  - name: Funding Source
    description: >-
      Funding Source Operations - Creating a funding source with controls,
      updating, deleting or retrieving controls associated with a funding
      source.
  - name: Virtual Card
    description: >-
      Virtual Card Operations - Generating a VCN with controls, updating,
      deleting or searching created virtual cards.
  - name: Custom Data Fields
    description: >-
      Custom Data Fields (CDF) Operations - Create, read, update, delete and 
      search custom data fields entries attached to an issuer or a corporate and
      linked to a particular card (real or virtual) for reporting. against the
      RCN/VCN.
  - name: Authorization Report
    description: >-
      Authorization Report Operations - Creating an Authorization Report that
      lists the authorizations that have occurred against the RCN/VCN or
      retrieving reports previously created.
  - name: Clearing Report
    description: >-
      Clearing Report Operations - Creating a Clearing Report that list details
      of the transactions that have been cleared against the RCN/VCN or
      retrieving reports previously created.
  - name: Clearing Summary Report
    description: >-
      Clearing Summary Report Operations - Creating a Clearing Summary Report
      that will list summary details of transactions that have been cleared
      against the RCN
  - name: Retail Api Migration
    description: >-
      Retail Api Migration Operations - Migrating real and virtual cards from
      Retail API to Business Payment Controls.
paths:
  /real-card-accounts:
    post:
      tags:
        - Card
        - Accounts
      summary: Registering a real card
      description: This endpoint allows users to register a real card account
      operationId: addRealCard
      requestBody:
        $ref: '#/components/requestBodies/RealCardAccount'
      responses:
        '201':
          $ref: '#/components/responses/RealCardAccount'
        '400':
          $ref: '#/components/responses/RealCardBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
  /real-card-accounts/searches:
    post:
      tags:
        - Card
        - Accounts
        - Searches
      summary: Retrieve real card account details
      description: >-
        This endpoint allows users to search for real card accounts using
        various search parameters
      operationId: searchRealCards
      requestBody:
        $ref: '#/components/requestBodies/RealCardAccountSearch'
      responses:
        '200':
          $ref: '#/components/responses/RealCardSearch'
        '400':
          $ref: '#/components/responses/CardSearchBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
  /real-card-accounts/{account_guid}:
    get:
      tags:
        - Card
        - Accounts
        - Real  Card
      summary: Retrieve card account details by AccountGuid
      description: >-
        This endpoint allows users to retrieve details of a particular card
        account by using the account_guid
      operationId: getRealCardByGuid
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
        - $ref: '#/components/parameters/unmasked_account_number'
      responses:
        '200':
          $ref: '#/components/responses/RealCardDetails'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
    put:
      tags:
        - Card
        - Accounts
        - Real  Card
      operationId: updateRealCardByGuid
      summary: Update card account
      description: >-
        This endpoint allows users to update different attributes of an existing
        card account. This endpoint can be used for use cases like updating the
        expiry date or name on card.
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
      requestBody:
        $ref: '#/components/requestBodies/RealCardAccountUpdate'
      responses:
        '200':
          $ref: '#/components/responses/RealCardAccountUpdate'
        '400':
          $ref: '#/components/responses/RealCardBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
    delete:
      tags:
        - Card
        - Accounts
        - Real  Card
      summary: Delete card account
      description: >-
        This endpoint allows users to delete details of a particular card
        account by using the account_guid
      operationId: deleteRealCardByGuid
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
  /virtual-card-accounts:
    post:
      tags:
        - Virtual
        - Card
        - Accounts
      summary: Registering a virtual card
      description: This endpoint allows users to register a virtual card account
      operationId: addVirtualCard
      requestBody:
        $ref: '#/components/requestBodies/VirtualCardAccountCreation'
      responses:
        '201':
          $ref: '#/components/responses/VirtualCardAccount'
        '400':
          $ref: '#/components/responses/VirtualCardBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
  /virtual-card-accounts/searches:
    post:
      tags:
        - Virtual
        - Card
        - Accounts
        - Searches
      summary: Retrieve virtual card account details
      description: >-
        This endpoint allows users to search for virtual card accounts using
        various search parameters
      operationId: searchVirtualCards
      requestBody:
        $ref: '#/components/requestBodies/VirtualCardAccountSearch'
      responses:
        '200':
          $ref: '#/components/responses/VirtualCardSearch'
        '400':
          $ref: '#/components/responses/CardSearchBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
  /funding-sources:
    post:
      tags:
        - Funding
        - Sources
      summary: Registering a funding source
      description: This endpoint allows users to register a funding source
      operationId: addFundingSource
      requestBody:
        $ref: '#/components/requestBodies/FundingSource'
      responses:
        '201':
          $ref: '#/components/responses/FundingSource'
        '400':
          $ref: '#/components/responses/FundingSourceBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
  /funding-sources/searches:
    post:
      tags:
        - Funding
        - Sources
        - Searches
      operationId: searchFundingSource
      summary: Retrieve funding source details
      description: >-
        This endpoint allows users to search for funding sources using various
        search parameters
      requestBody:
        $ref: '#/components/requestBodies/FundingSourceSearch'
      responses:
        '200':
          $ref: '#/components/responses/FundingSourceSearch'
        '400':
          $ref: '#/components/responses/FundingSourceBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
  /funding-sources/{funding_source_guid}:
    get:
      tags:
        - Funding
        - Sources
        - Funding  Source
      summary: Retrieve funding source details
      description: >-
        This endpoint allows users to retrieve details of a particular funding
        source by using the funding_source_guid
      operationId: getFundingSourceByGuid
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      responses:
        '200':
          $ref: '#/components/responses/FundingSourceDetails'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
    put:
      tags:
        - Funding
        - Sources
        - Funding  Source
      summary: Update funding source
      description: >-
        This endpoint allows users to update different attributes of an existing
        funding source.
      operationId: updateFundingSourceByGuid
      requestBody:
        $ref: '#/components/requestBodies/FundingSource'
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      responses:
        '200':
          $ref: '#/components/responses/FundingSourceDetails'
        '400':
          $ref: '#/components/responses/FundingSourceBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
    delete:
      tags:
        - Funding
        - Sources
        - Funding  Source
      summary: Delete funding source
      description: >-
        This endpoint allows users to delete details of a particular funding
        source by using the funding_source_guid
      operationId: deleteFundingSourceByGuid
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
  /funding-sources/{funding_source_guid}/status:
    put:
      tags:
        - Funding
        - Sources
        - Status
      summary: Update funding source status
      description: This endpoint allows users to update the status of a funding source.
      operationId: updateFundingSourceStatusByGuid
      requestBody:
        $ref: '#/components/requestBodies/FundingSourceStatusUpdate'
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      responses:
        '200':
          $ref: '#/components/responses/FundingSourceStatus'
        '400':
          $ref: '#/components/responses/FundingSourceBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
  /virtual-card-accounts/{account_guid}:
    delete:
      tags:
        - Virtual
        - Card
        - Accounts
        - Virtual  Card
      summary: Delete virtual card
      description: >-
        This endpoint allows users to delete a created virtual card account by
        using the account guid.
      operationId: deleteVirtualCardByGuid
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/VirtualCardNotFoundError'
    get:
      tags:
        - Virtual
        - Card
        - Accounts
        - Virtual  Card
      summary: Retrieve virtual card account details
      description: >-
        This endpoint allows users to retrieve details of a particular virtual
        card account by using the account_guid
      operationId: getVirtualCardByGuid
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
        - $ref: '#/components/parameters/unmasked_account_number'
      responses:
        '200':
          $ref: '#/components/responses/VirtualCardDetails'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/VirtualCardNotFoundError'
    put:
      tags:
        - Virtual
        - Card
        - Accounts
        - Virtual  Card
      summary: Update virtual card account
      description: >-
        This endpoint allows users to update different attributes of an existing
        virtual card account
      operationId: updateVirtualCardByGuid
      requestBody:
        $ref: '#/components/requestBodies/VirtualCardAccountUpdate'
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
      responses:
        '200':
          $ref: '#/components/responses/VirtualCardDetails'
        '400':
          $ref: '#/components/responses/VirtualCardBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/VirtualCardNotFoundError'
  /virtual-card-accounts/{account_guid}/status:
    put:
      tags:
        - Virtual
        - Card
        - Accounts
        - Status
      summary: Update virtual card status
      description: This endpoint allows users to update the status of a virtual card.
      operationId: updateVirtualCardStatusByGuid
      requestBody:
        $ref: '#/components/requestBodies/VirtualCardStatusUpdate'
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
      responses:
        '200':
          $ref: '#/components/responses/VirtualCardAccountStatus'
        '400':
          $ref: '#/components/responses/BadStatusRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/VirtualCardNotFoundError'
  /virtual-card-accounts/{account_guid}/end-user:
    post:
      tags:
        - Virtual
        - Card
        - Accounts
        - User
      summary: Registering end user contact details linked to a virtual card
      description: >-
        This endpoint allows users to provision a virtual card account and use
        it via mobile
      operationId: createVirtualCardEndUser
      requestBody:
        $ref: '#/components/requestBodies/AccountEndUser'
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
      responses:
        '201':
          $ref: '#/components/responses/AccountEndUserCreated'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
    get:
      tags:
        - Virtual
        - Card
        - Accounts
        - User
      summary: Retrieve end user contact details for a virtual card
      description: >-
        This endpoint allows users to retrieve details for an existing
        provisioned virtual card account
      operationId: getVirtualCardEndUser
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
      responses:
        '200':
          $ref: '#/components/responses/AccountEndUser'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
    put:
      tags:
        - Virtual
        - Card
        - Accounts
        - User
      summary: Update end user contact details for a virtual card
      description: >-
        This endpoint allows users to update different attributes for an
        existing provisioned virtual card account
      operationId: updateVirtualCardEndUser
      requestBody:
        $ref: '#/components/requestBodies/AccountEndUser'
      parameters:
        - $ref: '#/components/parameters/vc_account_guid'
      responses:
        '200':
          $ref: '#/components/responses/AccountEndUser'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
  /real-card-accounts/{account_guid}/contacts:
    post:
      tags:
        - Card
        - Accounts
        - Contacts
      summary: Register a new contact linked to a real card
      description: This endpoint allows users to register a contact
      operationId: addContact
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
      requestBody:
        $ref: '#/components/requestBodies/Contact'
      responses:
        '201':
          $ref: '#/components/responses/Contact'
        '400':
          $ref: '#/components/responses/ContactBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
    get:
      tags:
        - Card
        - Accounts
        - Contacts
      summary: Retrieve all contact details under a real card account
      description: >-
        This endpoint allows users to retrieve details of all contacts under a
        real card account by using the account_guid
      operationId: getRealCardContacts
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/page_length'
      responses:
        '200':
          $ref: '#/components/responses/Contacts'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
  /real-card-accounts/{account_guid}/contacts/{contact_guid}:
    get:
      tags:
        - Card
        - Accounts
        - Contacts
        - Guid
      summary: Retrieve contact details
      description: >-
        This endpoint allows users to retrieve details of a particular contact
        associated with a card by using the account guid and the contact guid.
      operationId: getContactByGuid
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
        - $ref: '#/components/parameters/contact_guid'
      responses:
        '200':
          $ref: '#/components/responses/ContactDetails'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
    put:
      tags:
        - Card
        - Accounts
        - Contacts
        - Guid
      operationId: updateContactByGuid
      summary: Update a contact
      description: >-
        This endpoint allows users to update different attributes of an existing
        contact using the account_guid and the contact_guid
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
        - $ref: '#/components/parameters/contact_guid'
      requestBody:
        $ref: '#/components/requestBodies/UpdatedContact'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedContactDetails'
        '400':
          $ref: '#/components/responses/ContactBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
    delete:
      tags:
        - Card
        - Accounts
        - Contacts
        - Guid
      operationId: deleteContactByGuid
      summary: Delete a contact
      description: >-
        This endpoint allows users to delete details of a particular contact by
        using the account_guid and the contact_guid
      parameters:
        - $ref: '#/components/parameters/rc_account_guid'
        - $ref: '#/components/parameters/contact_guid'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/RealCardNotFoundError'
  /funding-sources/{funding_source_guid}/controls:
    post:
      tags:
        - Funding
        - Sources
        - Controls
      summary: Register controls to a funding source
      description: This endpoint allows users to register controls to a funding source
      operationId: addFundingSourceControls
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      requestBody:
        $ref: '#/components/requestBodies/SimpleControl'
      responses:
        '201':
          $ref: '#/components/responses/SimpleControl'
        '400':
          $ref: '#/components/responses/FundingSourceBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
    put:
      tags:
        - Funding
        - Sources
        - Controls
      summary: Update controls linked to a funding source
      description: >-
        This endpoint allows users to update existing controls linked to a
        funding source.
      operationId: updateFundingSourceControls
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      requestBody:
        $ref: '#/components/requestBodies/SimpleControl'
      responses:
        '200':
          $ref: '#/components/responses/SimpleControlDetails'
        '400':
          $ref: '#/components/responses/FundingSourceBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
    delete:
      tags:
        - Funding
        - Sources
        - Controls
      summary: Delete controls linked to a funding source
      description: >-
        This endpoint allows users to delete controls linked to a funding source
        by using the funding_source_guid
      operationId: deleteFundingSourceControlsByGuid
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
    get:
      tags:
        - Funding
        - Sources
        - Controls
      summary: Retrieve controls linked to a funding source
      description: >-
        This endpoint allows users to retrieve existing controls linked to a
        funding source by using the funding source guid.
      operationId: getFundingSourceControlsByGuid
      parameters:
        - $ref: '#/components/parameters/funding_source_guid'
      responses:
        '200':
          $ref: '#/components/responses/SimpleControlDetails'
        '400':
          $ref: '#/components/responses/AccountBadRequestError'
        '401':
          $ref: '#/components/responses/AccountUnauthorizedError'
        '403':
          $ref: '#/components/responses/AccountForbiddenError'
        '404':
          $ref: '#/components/responses/FundingSourceNotFoundError'
  /authorization-reports:
    post:
      description: >-
        This endpoint allows users to create an authorization report that lists
        the authorizations that have occurred against the RCN/VCN within the
        time period specified.
      summary: Create an Authorization Report
      operationId: createAuthorizationReport
      tags:
        - Authorization
        - Reports
      requestBody:
        $ref: '#/components/requestBodies/AuthorizationReport'
      responses:
        '201':
          $ref: '#/components/responses/AuthorizationReportStatus'
        '400':
          $ref: '#/components/responses/ReportingServiceBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
    get:
      description: >-
        This endpoint allows users to retrieve status of all created RCN/VCN
        authorizations reports.
      summary: Get all Authorization Reports Status
      operationId: getAuthorizationReports
      tags:
        - Authorization
        - Reports
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/AuthorizationReport'
        '400':
          $ref: '#/components/responses/PaginationOffSetBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
  /authorization-reports/{guid}:
    get:
      description: >-
        This endpoint allows users to retrieve status of a previously created
        RCN/VCN Authorization Report by using the GUID.
      summary: Get Authorization Report Status By GUID
      operationId: getAuthorizationReportByGuid
      tags:
        - Authorization
        - Reports
        - Authorization  Report
      parameters:
        - $ref: '#/components/parameters/guid'
      responses:
        '200':
          $ref: '#/components/responses/AuthorizationReportSummary'
        '400':
          $ref: '#/components/responses/GuidInvalidBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /authorization-reports/{guid}/data:
    get:
      description: >-
        This endpoint allows users to fetch data from the previously created
        Authorisation Report. Authorisation Report data is returned paginated.
      summary: Fetch Authorization Report Data
      operationId: getAuthorizationReportContent
      tags:
        - Authorization
        - Reports
        - Data
      parameters:
        - $ref: '#/components/parameters/guid'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datalimit'
      responses:
        '200':
          $ref: '#/components/responses/Authorization'
        '400':
          $ref: '#/components/responses/GuidInvalidBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /clearing-reports:
    post:
      description: >-
        This endpoint allows users to create a clearing report that list details
        of the transactions that have been cleared against the RCN or VCN within
        the time period specified.
      summary: Create a Clearing Report
      operationId: createClearingReport
      tags:
        - Clearing
        - Reports
      requestBody:
        $ref: '#/components/requestBodies/ClearingReport'
      responses:
        '201':
          $ref: '#/components/responses/ClearingReport'
        '400':
          $ref: '#/components/responses/ReportingServiceBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
    get:
      description: >-
        This endpoint allows users to retrieve status of previously created
        RCN/VCN Clearing Reports.
      summary: Get all Clearing Reports Status
      operationId: getClearingReports
      tags:
        - Clearing
        - Reports
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/ClearingReportSummaryList'
        '400':
          $ref: '#/components/responses/PaginationOffSetBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
  /clearing-reports/{guid}:
    get:
      description: >-
        This endpoint allows users to retrieve status of a previously created
        RCN/VCN Clearing Report by using the GUID.
      summary: Get Clearing Report Status By GUID
      operationId: getClearingReportByGuid
      tags:
        - Clearing
        - Reports
        - Clearing  Report
      parameters:
        - $ref: '#/components/parameters/guid'
      responses:
        '200':
          $ref: '#/components/responses/ClearingReportSummary'
        '400':
          $ref: '#/components/responses/GuidInvalidBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /clearing-reports/{guid}/data:
    get:
      description: >-
        This endpoint allows users to fetch data for a previously created
        Clearing Report. Clearing Report data is returned paginated.
      summary: Fetch Clearing Report Data
      operationId: getClearingReportContent
      tags:
        - Clearing
        - Reports
        - Data
      parameters:
        - $ref: '#/components/parameters/guid'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datalimit'
      responses:
        '200':
          $ref: '#/components/responses/Clearing'
        '400':
          $ref: '#/components/responses/GuidInvalidBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /clearing-summary-reports:
    post:
      description: >-
        This endpoint allows users to create a Clearing Summary Report that will
        list summary details of transactions that have been cleared against the
        RCN within the time period specified.
      summary: Create a Clearing Summary Report
      operationId: createClearingSummaryReport
      tags:
        - Clearing
        - Summaries
        - Reports
      requestBody:
        $ref: '#/components/requestBodies/ClearingSummaryReport'
      responses:
        '201':
          $ref: '#/components/responses/ClearingSummaryReportStatus'
        '400':
          $ref: '#/components/responses/ReportingServiceBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
    get:
      description: >-
        This endpoint allows users to retrieve status of all previously created
        RCN Clearing Summary Reports.
      summary: Get all Clearing Summary Reports Status
      operationId: getClearingSummaryReports
      tags:
        - Clearing
        - Summaries
        - Reports
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/ClearingSummaryReportSummaryList'
        '400':
          $ref: '#/components/responses/PaginationOffSetBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
  /clearing-summary-reports/{guid}:
    get:
      description: >-
        This endpoint allows users to retrieve status of a previously created
        RCN Clearing Summary Report by using the GUID.
      summary: Get Clearing Summary Report status by GUID
      operationId: getClearingSummaryReportByGuid
      tags:
        - Clearing
        - Summaries
        - Reports
        - Clearing  Summary  Report
      parameters:
        - $ref: '#/components/parameters/guid'
      responses:
        '200':
          $ref: '#/components/responses/ClearingSummaryReportSummary'
        '400':
          $ref: '#/components/responses/GuidInvalidBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /clearing-summary-reports/{guid}/data:
    get:
      description: >-
        This endpoint allows users to fetch data for a previously created
        clearing summary report. Clearing summary report data is returned
        paginated.
      summary: Fetch Clearing Summary Report Data
      operationId: getClearingSummaryReportContent
      tags:
        - Clearing
        - Summaries
        - Reports
        - Data
      parameters:
        - $ref: '#/components/parameters/guid'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/datalimit'
      responses:
        '200':
          $ref: '#/components/responses/ClearingSummary'
        '400':
          $ref: '#/components/responses/GuidInvalidBadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /custom-data:
    post:
      tags:
        - Custom
        - Data
      summary: Creating a Custom Data collection
      description: >-
        This endpoint allows users to create custom data. Do not use PII data as
        part of custom data field value.
      operationId: createCustomData
      requestBody:
        $ref: '#/components/requestBodies/CustomData'
      responses:
        '201':
          $ref: '#/components/responses/CustomData'
        '400':
          $ref: '#/components/responses/CustomDataBadRequestError'
  /custom-data/{custom_data_guid}:
    get:
      tags:
        - Custom
        - Data
        - Custom  Data  Fields
      summary: Retrieve Custom Data details
      description: >-
        This endpoint allows users to retrieve details of a previously created 
        custom data collection by using the custom_data_guid. Do not use PII
        data as part of custom data field value.
      operationId: getCustomDataByCustomDataGuid
      parameters:
        - $ref: '#/components/parameters/custom_data_guid'
      responses:
        '200':
          $ref: '#/components/responses/CustomData'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
    put:
      tags:
        - Custom
        - Data
        - Custom  Data  Fields
      summary: Update a custom data collection
      description: >-
        This endpoint allows users to update an existing custom data collection.
        Do not use PII data as part of custom data field value.
      operationId: updateCustomDataByCustomDataGuid
      parameters:
        - $ref: '#/components/parameters/custom_data_guid'
      requestBody:
        $ref: '#/components/requestBodies/CustomData'
      responses:
        '200':
          $ref: '#/components/responses/CustomData'
        '400':
          $ref: '#/components/responses/CustomDataBadRequestError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
    delete:
      tags:
        - Custom
        - Data
        - Custom  Data  Fields
      summary: Delete a custom data collection
      description: >-
        This endpoint allows users to delete a custom data collection  by using
        the custom_data_guid
      operationId: deleteCustomDataByCustomDataGuid
      parameters:
        - $ref: '#/components/parameters/custom_data_guid'
      responses:
        '204':
          description: No Content
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
  /custom-data/searches:
    post:
      tags:
        - Custom
        - Data
        - Searches
      summary: Retrieve Custom Data details
      description: >-
        This endpoint allows users to search for  custom data using various
        search parameters
      operationId: searchCustomData
      requestBody:
        $ref: '#/components/requestBodies/CustomDataSearch'
      responses:
        '200':
          $ref: '#/components/responses/CustomDataSearch'
        '400':
          $ref: '#/components/responses/CustomDataBadRequestError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
  /retail-account-migrations:
    post:
      tags:
        - Retail
        - Accounts
        - Migrations
      summary: Migrating RCNs and VCNs from Retail API
      description: >-
        This endpoint allows users to fetch GUIDs for RCNs and VCNs that were
        created in Retail API.
      operationId: migrateRetailApiRecord
      requestBody:
        $ref: '#/components/requestBodies/RetailApiMigration'
      responses:
        '200':
          $ref: '#/components/responses/RetailApiMigration'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
  /entities/user-entity:
    get:
      tags:
        - Users
      operationId: getEntity
      summary: Get the API users entity identifier.
      description: >-
        This endpoint allows users to fetch the identifier (GUID) of the entity
        that their account is associated with.
      responses:
        '200':
          $ref: '#/components/responses/Entity'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
  /entities/{guid}/descendants:
    get:
      tags:
        - Guid
        - Descendants
      operationId: getDescendants
      summary: Get the descendant entity identifiers for a given entity.
      description: >-
        This endpoint allows users to fetch the identifier (GUID) of any
        descendant entities that their account is associated with, so that Real
        Cards can be registered with the appropriate entity.
      parameters:
        - $ref: '#/components/parameters/descendents_guid'
        - $ref: '#/components/parameters/entity_type'
        - $ref: '#/components/parameters/entity_guid'
        - $ref: '#/components/parameters/entity_name'
        - $ref: '#/components/parameters/entity_status'
        - $ref: '#/components/parameters/ica'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/EntitySearchResource'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
components:
  examples:
    NewRealCardAccount:
      summary: Register New Real Card Account
      value:
        expiry: 2031-11
        applicationSource: bpc
        nameOnCard: John Doe
        ownerGuid: >-
          SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
        authorizationControlsEnabled: true
        accountNumber: '5569507890123457042'
        unmaskedAccountNumber: true
    ReplaceRealCardAccount:
      summary: Replace Real Card Account
      value:
        expiry: 2031-11
        applicationSource: bpc
        nameOnCard: John Doe
        ownerGuid: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        authorizationControlsEnabled: true
        replacedAccountGuid: >-
          0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        replacedAccountReason: LOST
        accountNumber: 5234567890123457000
        unmaskedAccountNumber: true
    virtualCardWithComplexRuleRequest:
      summary: Virtual Card With Complex Rules
      value:
        expiry: 2024-11
        fundingSourceGuid: >-
          0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        unmaskedAccountNumber: true
        rules:
          inControlRules:
            - action: APPROVE
              alias: Virtual Card Complex Rules
              velocities:
                - maxTrans: 12
                  cumulativeLimit: 1200
                  period: DAILY
                  currencyType: MERCHANT
                  currencyCode: '100'
                  negate: true
              validityPeriods:
                - from: '2030-08-01T00:00:00.000Z'
                  to: '2035-12-31T00:00:00.000Z'
                  strictPreAuthCheck: true
                  negate: false
              acceptorIds:
                - negate: false
                  acceptors:
                    - acceptorId: '123451234512344'
                      acquirerId: '123123'
              merchantNames:
                - negate: true
                  merchantNames:
                    - Amazon
        customDataGuid: >-
          0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    virtualCardWithSimpleRuleRequest:
      summary: Virtual Card With Simple Rules
      value:
        expiry: 2024-11
        fundingSourceGuid: >-
          0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        unmaskedAccountNumber: true
        rules:
          accountControl:
            action: APPROVE
            alias: Virtual Card Simple Rules
            dailyLimit:
              cardAmount: 500
              authorisationCount: 10
            quarterlyLimit:
              cardAmount: 500
              authorisationCount: 10
            merchantCategoryCodes:
              negate: false
              mccs:
                - '3001'
                - '3005'
        customDataGuid: >-
          0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    virtualCardWithComplexRuleResponse:
      summary: Virtual Card With Complex Rules
      value:
        accountGuid: >-
          0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        expiry: 2024-11
        billingCurrency: '826'
        billingCurrencyAlphabetic: GBP
        active: true
        createdDate: '2020-10-06T11:09:42.000Z'
        lastUpdateDate: '2020-10-06T11:09:42.000Z'
        fundingSourceGuid: >-
          0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        ownerGuid: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        cvc: '123'
        rules:
          inControlRules:
            - action: APPROVE
              alias: Virtual Card Complex Rules
              velocities:
                - maxTrans: 12
                  cumulativeLimit: 1200
                  period: DAILY
                  availableBalance: 1200
                  currencyType: MERCHANT
                  currencyCode: '100'
                  endDate: '2020-10-06T11:09:42.000Z'
                  negate: true
              validityPeriods:
                - from: '2030-08-01T00:00:00.000Z'
                  to: '2035-12-31T00:00:00.000Z'
                  strictPreAuthCheck: true
                  negate: false
              acceptorIds:
                - negate: false
                  acceptors:
                    - acceptorId: '123451234512344'
                      acquirerId: '123123'
              merchantNames:
                - negate: true
                  merchantNames:
                    - Amazon
        accountNumber: XXXXXXXXXXXXXX6789
        customDataGuid: >-
          0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    virtualCardWithSimpleRuleResponse:
      summary: Virtual Card With Simple Rules
      value:
        accountGuid: >-
          0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        expiry: 2024-11
        billingCurrency: '826'
        billingCurrencyAlphabetic: GBP
        active: true
        createdDate: '2020-10-06T11:09:42.000Z'
        lastUpdateDate: '2020-10-06T11:09:42.000Z'
        fundingSourceGuid: >-
          0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        ownerGuid: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        cvc: '123'
        rules:
          accountControl:
            action: APPROVE
            alias: Virtual Card Simple Rules
            dailyLimit:
              cardAmount: 500
              availableBalance: 500
              authorisationCount: 10
            quarterlyLimit:
              cardAmount: 500
              availableBalance: 500
              authorisationCount: 10
            merchantCategoryCodes:
              negate: false
              mccs:
                - '3001'
                - '3005'
        accountNumber: '5995028501267659'
        customDataGuid: >-
          0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    simpleRulesResponse:
      summary: Simple Control Rules
      value:
        accountControl:
          action: APPROVE
          alias: Account Service Rule
          monthlyLimit:
            cardAmount: 500
            availableBalance: 500
            authorisationCount: 10
          dailyLimit:
            cardAmount: 500
            availableBalance: 500
            authorisationCount: 10
          geographies:
            countryCodes:
              - '076'
              - '724'
              - '788'
            negate: false
          merchantCategoryCodes:
            mccs:
              - '3001'
            negate: false
          startDate: '2020-10-06T11:09:42.000Z'
          endDate: '2021-10-06T11:09:42.000Z'
    complexRulesResponse:
      summary: Complex Control Rules
      value:
        inControlRules:
          action: APPROVE
          alias: Control Alias 1
          velocities:
            maxTrans: '12'
            cumulativeLimit: '1200'
            period: DAILY
            availableBalance: '1200'
            currencyType: MERCHANT
            currencyCode: '100'
            endDate: '2023-11-29T23:59:59.000Z'
            negate: true
          validityPeriods:
            from: '2030-08-01T00:00:00.000Z'
            to: '2035-12-31T00:00:00.000Z'
            strictPreAuthCheck: true
            negate: false
          merchantCategoryCodes:
            negate: false
            mccs:
              - '3001'
              - '3005'
          merchantNames:
            negate: true
            merchantNames:
              - Amazon
          approveControl:
            negate: true
  schemas:
    RealCardAccount:
      description: Real Card Account
      required:
        - nameOnCard
        - accountNumber
        - ownerGuid
      allOf:
        - $ref: '#/components/schemas/RealCardAccountDetails'
        - type: object
          required:
            - nameOnCard
            - accountNumber
            - ownerGuid
          properties:
            accountNumber:
              maxLength: 19
              minLength: 12
              pattern: ^[0-9]*$
              type: string
              description: >-
                The account number. For a card account this is the associated
                real card number.
              example: '5569507890123457042'
            unmaskedAccountNumber:
              type: boolean
              description: Defines if account number displayed should be unmasked.
              example: true
              writeOnly: true
    RealCardAccountDetails:
      description: Real Card Account Details
      required:
        - nameOnCard
        - ownerGuid
      allOf:
        - $ref: '#/components/schemas/RCAccountGuid'
        - $ref: '#/components/schemas/CardAccount'
        - type: object
          required:
            - nameOnCard
            - ownerGuid
          properties:
            nameOnCard:
              maxLength: 100
              minLength: 1
              type: string
              pattern: .*\S.*
              description: Name on the card
              example: John Doe
            ownerGuid:
              maxLength: 100
              minLength: 1
              type: string
              pattern: ^[A-Za-z0-9_=-]+$
              description: >-
                The globally unique identifier of the entity under which the
                card is registered. The ownerGUID is the same as the Issuer GUID
                or Corp GUID.
              example: >-
                SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            authorizationControlsEnabled:
              type: boolean
              description: Defines if card controls should be enabled
              example: true
            replacedAccountGuid:
              maxLength: 100
              minLength: 1
              type: string
              description: >-
                The globally unique identifier of the card account that should
                be replaced
              example: >-
                0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
            replacedAccountReason:
              minLength: 1
              maxLength: 30
              type: string
              description: >-
                Reason to replace the card; valid values are LOST, STOLEN, and
                REPLACED.
              example: LOST
              pattern: ^(LOST|STOLEN|REPLACED)
    VirtualCardAccount:
      description: Virtual card account object containing detailed information
      allOf:
        - $ref: '#/components/schemas/VirtualCardAccountDetails'
        - type: object
          properties:
            cvc:
              minLength: 3
              type: string
              description: Card Verification Code.
              readOnly: true
              example: '123'
            rules:
              $ref: '#/components/schemas/VirtualCardControl'
            transactionTolerances:
              type: array
              description: Transaction tolerance for currencies
              items:
                $ref: '#/components/schemas/TransactionTolerance'
            unmaskedAccountNumber:
              type: boolean
              description: Defines if account number displayed should be unmasked.
              example: true
              writeOnly: true
            accountNumber:
              maxLength: 19
              minLength: 12
              pattern: ^[0-9]*$
              type: string
              description: >-
                The account number. For a card account this is the associated
                virtual card number.
              example: '523456789123456789'
              readOnly: true
            customDataGuid:
              maxLength: 100
              minLength: 1
              pattern: ^[A-Za-z0-9_=-]+$
              type: string
              description: The globally unique identifier for a custom data collection
              example: >-
                0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    VirtualCardAccountDetails:
      description: Virtual Card Account
      allOf:
        - $ref: '#/components/schemas/VCAccountGuid'
        - $ref: '#/components/schemas/CardAccount'
        - required:
            - fundingSourceGuid
          type: object
          properties:
            fundingSourceGuid:
              maxLength: 100
              minLength: 1
              type: string
              description: The globally unique identifier for the funding source.
              example: >-
                0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
            ownerGuid:
              maxLength: 100
              minLength: 1
              type: string
              readOnly: true
              description: >-
                The globally unique identifier of the entity under which the
                card is registered. The ownerGUID is the same as the Issuer GUID
                or Corp GUID.
              example: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
    VirtualCardStatusUpdate:
      type: object
      required:
        - status
      properties:
        unmaskedAccountNumber:
          type: boolean
          description: Defines if account number displayed should be unmasked.
          example: true
        status:
          type: string
          description: Virtual Card Status. Valid values are ACTIVE and BLOCKED
          example: BLOCKED
          pattern: ^(ACTIVE|BLOCKED)
      description: Virtual Card Status Update
    FundingSourceStatusUpdate:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: Funding Source Status. Valid values are ACTIVE and BLOCKED
          example: BLOCKED
      description: Funding Source Status Update
    FundingSource:
      required:
        - realCardGuid
      type: object
      properties:
        fundingSourceGuid:
          type: string
          maxLength: 100
          minLength: 1
          description: The globally unique identifier for the funding source.
          example: >-
            0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
          readOnly: true
        realCardGuid:
          type: string
          maxLength: 100
          minLength: 1
          description: >-
            The globally unique identifier for the real card. For card accounts
            realCardGuid is same as the accountGuid
          example: >-
            0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        vcnCreationEnabled:
          type: boolean
          description: Defines if virtual card creation is enabled.
          example: true
        fundingSourceAlias:
          type: string
          pattern: .*\S.*
          maxLength: 400
          minLength: 1
          description: Alias for the funding source.
          example: Funding Source Alias
        authorizationControlsEnabled:
          type: boolean
          description: Defines if card controls should be enabled
          example: true
        active:
          type: boolean
          description: Defines if the funding source is active.
          example: true
          readOnly: true
        ownerGuid:
          maxLength: 100
          minLength: 1
          type: string
          readOnly: true
          description: >-
            The globally unique identifier of the entity under which the card is
            registered. The ownerGUID is the same as the Issuer GUID or Corp
            GUID.
          example: >-
            SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
        createdDate:
          type: string
          description: Date when the funding source was created
          example: '2020-10-06T11:09:42.000Z'
          readOnly: true
          format: date-time
        lastUpdateDate:
          type: string
          description: Timestamp of last update.
          readOnly: true
          format: date-time
          example: '2020-10-06T11:09:42.000Z'
        customDataGuid:
          maxLength: 100
          minLength: 1
          pattern: ^[A-Za-z0-9_=-]+$
          type: string
          description: The globally unique identifier for a custom data collection
          example: >-
            0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
      description: Funding Source
    RealCardSearchResource:
      description: Real Card Search Resource
      allOf:
        - $ref: '#/components/schemas/RealCardAccount'
        - type: object
          properties:
            corpGuid:
              minLength: 1
              maxLength: 100
              description: >-
                The globally unique identifier of the corporate, which is
                created in SmartData during setup
              type: string
              readOnly: true
              example: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
            issuerGuid:
              minLength: 1
              maxLength: 100
              description: The globally unique identifier of the issuer.
              type: string
              readOnly: true
              example: SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
            fundingSourceGuid:
              minLength: 1
              maxLength: 100
              description: The globally unique identifier for the funding source.
              type: string
              readOnly: true
              example: >-
                0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
            alias:
              description: Funding Source alias
              type: string
              minLength: 1
              maxLength: 400
              readOnly: true
              example: Funding Source Alias
            vcnCreationEnabled:
              description: Defines if virtual card creation is enabled.
              type: boolean
              readOnly: true
              example: true
    VirtualCardSearchResource:
      description: Virtual Card Search Resource
      allOf:
        - $ref: '#/components/schemas/VirtualCardAccountDetails'
        - type: object
          properties:
            corpGuid:
              minLength: 1
              maxLength: 100
              description: >-
                The globally unique identifier of the corporate, which is
                created in SmartData during setup
              type: string
              readOnly: true
              example: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
            issuerGuid:
              minLength: 1
              maxLength: 100
              description: The globally unique identifier of the issuer.
              type: string
              readOnly: true
              example: SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
            unmaskedAccountNumber:
              type: boolean
              description: Defines if account number displayed should be unmasked.
              example: true
              writeOnly: true
            accountNumber:
              maxLength: 19
              minLength: 12
              pattern: ^[0-9]*$
              type: string
              description: >-
                The account number. For a card account this is the associated
                virtual card number.
              example: XXXXXXXXXXXXXX6789
              readOnly: true
    RealCardAccountSearch:
      type: object
      allOf:
        - $ref: '#/components/schemas/RealCardAccountSearchDetails'
        - type: object
          properties:
            unmaskedAccountNumber:
              type: boolean
              description: Defines if account number displayed should be unmasked.
              example: true
    RealCardAccountSearchDetails:
      type: object
      properties:
        corpGuids:
          type: array
          description: Array of corporate GUIDs
          example:
            - SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
          items:
            type: string
        issuerGuids:
          type: array
          description: Array of issuer GUIDs
          example:
            - SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
          items:
            type: string
        accountGuids:
          type: array
          description: Array of account GUIDs
          example:
            - >-
              0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
          items:
            type: string
        aliases:
          type: array
          description: Real Card Alias
          example:
            - Real Card Alias
          items:
            type: string
        fundingSourceGuids:
          type: array
          items:
            type: string
          description: Array of funding source GUIDS
          example:
            - >-
              0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        accountNumber:
          minLength: 12
          maxLength: 19
          type: string
          example: '523456789123456789'
          description: >-
            The account number. For a card account this is the associated real
            card number.
          pattern: ^[0-9]*$
        expiry:
          minLength: 7
          maxLength: 7
          type: string
          pattern: 20[2-9][0-9]-(0[1-9]|1[012])
          description: Expiry in yyyy-mm format
          example: 2026-10
        expired:
          type: boolean
          description: Expired (true or false)
          example: true
        pagination:
          $ref: '#/components/schemas/Pagination'
        vcnCreationEnabled:
          type: boolean
          description: Defines if virtual card creation is enabled.
          example: true
    VirtualCardAccountSearch:
      type: object
      properties:
        corpGuids:
          type: array
          description: Array of corporate GUIDs
          example:
            - SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
          items:
            type: string
        issuerGuids:
          type: array
          description: Array of issuer GUIDs
          example:
            - SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
          items:
            type: string
        accountGuids:
          type: array
          description: Array of account GUIDs
          example:
            - >-
              0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
          items:
            type: string
        fundingSourceGuids:
          type: array
          description: Array of funding source GUIDS
          example:
            - >-
              0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
          items:
            type: string
        statuses:
          type: array
          description: Array of status of Virtual Card
          example:
            - ACTIVE
          items:
            type: string
            example: items
        accountNumber:
          minLength: 12
          maxLength: 19
          type: string
          description: >-
            The account number. For a card account this is the associated
            virtual card number.
          example: '523456789123456789'
          pattern: ^[0-9]*$
        accountNumberLastFourDigits:
          minLength: 4
          maxLength: 4
          type: string
          description: >-
            The last 4 digits of the account number. For card accounts this
            would be the last 4 digits of the card number.
          example: '6789'
          pattern: ^[0-9]{4}$
        expiry:
          minLength: 7
          maxLength: 7
          type: string
          pattern: 20[2-9][0-9]-(0[1-9]|1[012])
          description: Expiry in yyyy-mm format
          example: 2026-10
        pagination:
          $ref: '#/components/schemas/Pagination'
        unmaskedAccountNumber:
          type: boolean
          description: Defines if account number displayed should be unmasked.
          example: true
    FundingSourceSearch:
      type: object
      properties:
        corpGuids:
          description: Identifier for Corps
          type: array
          items:
            type: string
          example:
            - SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        issuerGuids:
          description: Identifier for Issuers
          type: array
          items:
            type: string
          example:
            - SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        realCardGuids:
          description: Identifier for Real Cards
          type: array
          items:
            type: string
          example:
            - >-
              0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        fundingSourceAliases:
          description: Aliases of Funding Source
          type: array
          items:
            type: string
          example:
            - Funding Source Alias
        fundingSourceGuids:
          description: Identifier for Funding Sources
          type: array
          items:
            type: string
          example:
            - >-
              0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        vcnCreationEnabled:
          description: Defines if virtual card creation is enabled.
          type: boolean
          example: true
        pagination:
          $ref: '#/components/schemas/Pagination'
    Pagination:
      type: object
      properties:
        page:
          minimum: 0
          maximum: 999
          type: integer
          description: The page number being requested.
          example: 1
        pageLength:
          minimum: 1
          maximum: 200
          type: integer
          description: The size of the page being requested in the range of 1 and 200.
          example: 20
        sortingOptions:
          type: array
          description: >-
            Valid sorting Real Card parameters are issuerGuid, corpGuid, alias,
            createdDate and lastUpdateDate.


            Valid sorting Funding Source parameters are issuerGuid, corpGuid,
            fundingSourceAlias, createdDate and lastUpdateDate.


            Valid sorting Virtual Card parameters are issuerGuid, corpGuid,
            createdDate and lastUpdateDate. 


            Valid sorting directions are desc and asc. For example
            "?sort=lastUpdateDate, desc". By default, results are sorted by
            createdDate in descending order.
          items:
            $ref: '#/components/schemas/Sort'
          example:
            - property: createdDate
              direction: asc
    Sort:
      type: object
      required:
        - property
        - direction
      properties:
        property:
          minLength: 1
          maxLength: 100
          type: string
          description: Field name used to search
          example: issuerGuid
        direction:
          minLength: 3
          maxLength: 4
          type: string
          example: desc
          description: >-
            Sorts the output in descending or ascending order; Valid values asc,
            desc.
          pattern: ^(ASC|DESC|asc|desc)$
    RCAccountGuid:
      type: object
      properties:
        accountGuid:
          minLength: 1
          maxLength: 100
          type: string
          description: The globally unique identifier of the real card account
          readOnly: true
          example: >-
            0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
    VCAccountGuid:
      type: object
      properties:
        accountGuid:
          minLength: 1
          maxLength: 100
          type: string
          description: The globally unique identifier of the virtual card account
          readOnly: true
          example: >-
            0ENT6d8f279532fff6e27c31b2bc3e04eb59a7799ebabd130757b0129bc2fa029b2b1702046890
    CardAccount:
      required:
        - expiry
      properties:
        expiry:
          minLength: 7
          maxLength: 7
          type: string
          pattern: ^20[2-9][0-9]-(0[1-9]|1[012])$
          description: Card expiry date in yyyy-MM format
          example: 2031-11
        billingCurrency:
          maxLength: 3
          minLength: 3
          pattern: ^[0-9]*$
          type: string
          description: Currency code as defined in ISO-4217A standard numeric code
          readOnly: true
          example: '826'
        billingCurrencyAlphabetic:
          maxLength: 3
          minLength: 3
          pattern: ^[A-Z]+$
          type: string
          description: >-
            Alphabetic currency code as defined in ISO-4217 standard numeric
            code
          readOnly: true
          example: GBP
        active:
          type: boolean
          description: Defines if the account is active.
          readOnly: true
          example: true
        createdDate:
          type: string
          description: Date when the account was created
          readOnly: true
          format: date-time
          example: '2020-10-06T11:09:42.000Z'
        lastUpdateDate:
          type: string
          description: Timestamp of last update.
          readOnly: true
          format: date-time
          example: '2020-10-06T11:09:42.000Z'
        applicationSource:
          type: string
          description: The source application using the resource/API.
          example: bpc
          pattern: '[A-Za-z0-9]+'
          minLength: 1
          maxLength: 16
      description: Card Account
    Contact:
      type: object
      properties:
        contactGuid:
          maxLength: 100
          minLength: 1
          type: string
          description: The globally unique identifier of the contact
          readOnly: true
          example: >-
            0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        firstName:
          type: string
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          description: First Name of Contact
          example: John
        middleInitial:
          type: string
          maxLength: 1
          minLength: 1
          pattern: .*\S.*
          description: Middle Initial of Contact
          example: `
        lastName:
          type: string
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          description: Last Name of Contact
          example: Doe
        nameSuffix:
          type: string
          maxLength: 40
          minLength: 1
          pattern: .*\S.*
          description: Name Suffix of Contact
          example: Jr
        issuerGuid:
          maxLength: 100
          minLength: 1
          type: string
          description: The globally unique identifier of the issuer.
          readOnly: true
          example: SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        corpGuid:
          maxLength: 100
          minLength: 1
          type: string
          description: The globally unique identifier of the corporate.
          readOnly: true
          example: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
        addressLine1:
          type: string
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          description: First Address Line of Contact
          example: 8589 Lexington Drive
        addressLine2:
          type: string
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          description: Second Address Line of Contact
          example: Temple Hills
        addressLine3:
          type: string
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          description: Third Address Line of Contact
          example: Brooklyn
        poBoxNumber:
          type: string
          maxLength: 15
          minLength: 1
          pattern: .*\S.*
          description: PO Box Number of Contact
          example: '1234'
        cityName:
          type: string
          maxLength: 40
          minLength: 1
          pattern: .*\S.*
          description: City Name of Contact
          example: New York
        countrySubdivisionCode:
          type: string
          maxLength: 40
          minLength: 1
          pattern: .*\S.*
          description: Sub-Division Name of Contact
          example: D
        postalCode:
          type: string
          maxLength: 15
          minLength: 1
          pattern: .*\S.*
          description: Post code of Contact
          example: NY 11215
        countryCode:
          type: string
          maxLength: 3
          minLength: 1
          pattern: .*\S.*
          description: Country Code of Contact
          example: '840'
        active:
          type: boolean
          description: Defines if the contact is active.
          readOnly: true
          example: true
        buildingText:
          type: string
          maxLength: 25
          minLength: 1
          pattern: .*\S.*
          description: Building Name of Contact
          example: The John Doe Center
        lastUpdateDate:
          type: string
          description: Timestamp of last update.
          readOnly: true
          format: date-time
          example: '2020-10-06T11:09:42.000Z'
      description: Contact for a Card Account
    TransactionTolerance:
      required:
        - cumulativeToleranceMax
        - cumulativeToleranceMin
        - cumulativeTolerancePercent
        - currencyCode
        - txTolerancePercent
        - txTolerancePercentMax
        - txTolerancePercentMin
      type: object
      properties:
        currencyCode:
          minLength: 3
          maxLength: 3
          pattern: ^[0-9]{3}$
          type: string
          example: '840'
          description: >-
            Mastercard-supported International Organization for Standardization
            (ISO) 4217 currency codes.
        cumulativeTolerancePercent:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          example: 1234
          description: >-
            Cumulative tolerances in percentages that maybe applied to each
            virtual card.
        txTolerancePercent:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          example: 1234
          description: >-
            Transaction tolerances in percentages that may be applied to each
            virtual card.
        cumulativeToleranceMin:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          example: 1234
          description: >-
            Minimum cumulative tolerances in percentages that may be applied to
            each virtual card.
        txTolerancePercentMin:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          example: 1234
          description: >-
            Minimum transaction tolerances in percentages that may be applied to
            each virtual card.
        cumulativeToleranceMax:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          example: 1234
          description: >-
            Maximum cumulative tolerances in percentages that may be applied to
            each virtual card.
        txTolerancePercentMax:
          type: integer
          format: int64
          minimum: 0
          maximum: 9999999999
          example: 1234
          description: >-
            Maximum transaction tolerances in percentages that may be applied to
            each virtual card.
      description: Transaction Amount Tolerance
    VirtualCardControl:
      type: object
      description: >-
        Card account controls. One of accountControl or inControlRules should be
        provided.
      properties:
        accountControl:
          $ref: '#/components/schemas/AccountControl'
        inControlRules:
          type: array
          description: Card Controls
          items:
            $ref: '#/components/schemas/VirtualCardInControlRule'
    RealCardControl:
      type: object
      description: >-
        Real Card account controls, one of accountControl and cardControls
        should be provided.
      properties:
        accountControl:
          $ref: '#/components/schemas/AccountControl'
        inControlRules:
          type: array
          description: Card Controls
          items:
            $ref: '#/components/schemas/RealCardInControlRule'
    AccountControl:
      description: Flag to denote In Control rules set.
      type: object
      properties:
        action:
          type: string
          description: Control rule actions.
          example: APPROVE
          readOnly: true
          minLength: 4
        alias:
          type: string
          description: Control rule alias name. The alias name should be unique.
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          example: Account Service Rule
        cardLimit:
          $ref: '#/components/schemas/Limit'
        monthlyLimit:
          $ref: '#/components/schemas/Limit'
        dailyLimit:
          $ref: '#/components/schemas/Limit'
        weeklyLimit:
          $ref: '#/components/schemas/Limit'
        quarterlyLimit:
          $ref: '#/components/schemas/Limit'
        yearlyLimit:
          $ref: '#/components/schemas/Limit'
        geographies:
          $ref: '#/components/schemas/GeographyControl'
        merchantCategoryCodes:
          $ref: '#/components/schemas/MccControl'
        startDate:
          type: string
          description: >-
            The time the card can be used from. It should be in ISO Date Time
            with Offset format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
          example: '2020-10-06T11:09:42.000Z'
          format: date-time
        endDate:
          type: string
          description: >-
            The time the card will stop being used from. It should be in ISO
            Date Time with Offset format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
          example: '2021-10-06T11:09:42.000Z'
          format: date-time
    Limit:
      description: Limit on the card
      type: object
      properties:
        cardAmount:
          type: number
          description: Card Limit Amount
          example: 500
          format: float
        availableBalance:
          type: number
          description: Available Card Balance
          example: 500
          format: float
          readOnly: true
        authorisationCount:
          description: Number of authorizations allowed
          minimum: 1
          maximum: 99999999
          example: 10
          type: integer
    InControlRule:
      required:
        - action
        - alias
      type: object
      properties:
        action:
          minLength: 4
          maxLength: 15
          type: string
          description: Control rule actions. Valid values are APPROVE and DECLINE.
          example: APPROVE
          pattern: ^(APPROVE|DECLINE)
        alias:
          type: string
          description: Control rule alias name. Alias should be unique.
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          example: Account Service Control Rule
        transactionLimits:
          type: array
          description: Transaction limit controls.
          items:
            $ref: '#/components/schemas/TransactionLimitControl'
        geographies:
          type: array
          description: Geography controls.
          items:
            $ref: '#/components/schemas/GeographyControl'
        velocities:
          type: array
          description: Velocity controls.
          items:
            $ref: '#/components/schemas/VelocityControl'
        validityPeriods:
          type: array
          description: Validity period controls.
          items:
            $ref: '#/components/schemas/ValidityPeriodControl'
        amountRanges:
          type: array
          description: Amount range controls.
          items:
            $ref: '#/components/schemas/AmountRangeControl'
        acceptorIds:
          type: array
          description: Merchant id controls.
          items:
            $ref: '#/components/schemas/MerchantIdControl'
        ageingVelocities:
          type: array
          description: Ageing velocity controls.
          items:
            $ref: '#/components/schemas/AgeingVelocityControl'
        curfews:
          type: array
          description: Curfew controls.
          items:
            $ref: '#/components/schemas/CurfewControl'
        timeOfDays:
          type: array
          description: Time of day controls.
          items:
            $ref: '#/components/schemas/TimeOfDayControl'
        merchantCategoryCodes:
          type: array
          description: >-
            List of Merchant Category Codes to be included in the rule. When
            action ="APPROVE" only transactions for the Merchant Category Codes
            included would be approved.
          items:
            $ref: '#/components/schemas/MccControl'
        merchantNames:
          type: array
          description: Merchant name controls
          uniqueItems: true
          items:
            $ref: '#/components/schemas/MerchantNameControl'
        transactionEnvironments:
          type: array
          description: Transaction environment controls
          uniqueItems: true
          items:
            $ref: '#/components/schemas/TransactionEnvironmentControl'
        dataElements:
          type: array
          description: Data element controls
          uniqueItems: true
          items:
            $ref: '#/components/schemas/DataElementControl'
        approveControl:
          $ref: '#/components/schemas/ApproveControl'
      description: In Control Rule
    VirtualCardInControlRule:
      allOf:
        - $ref: '#/components/schemas/InControlRule'
    RealCardInControlRule:
      allOf:
        - $ref: '#/components/schemas/InControlRule'
        - type: object
          properties:
            entryModes:
              type: array
              description: Entry model controls.
              uniqueItems: true
              items:
                $ref: '#/components/schemas/EntryModeControl'
    TransactionLimitControl:
      required:
        - amount
        - negate
      type: object
      properties:
        amount:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: The limit that will apply on a per transaction basis.
          example: 12
          format: float
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          example: true
          default: true
      description: >-
        The TransactionLimit control provides the ability to limit individual
        transaction authorizations to a maximum amount.
    GeographyControl:
      required:
        - countryCodes
        - negate
      type: object
      properties:
        countryCodes:
          minItems: 1
          type: array
          description: List of country codes to be included in the rule.
          example:
            - '372'
            - '826'
          items:
            type: string
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          example: true
      description: >-
        The GeographicControl provides the ability to control where a card is
        physically used.
    VelocityControl:
      required:
        - period
        - negate
      type: object
      properties:
        maxTrans:
          minimum: 1
          maximum: 99999999
          type: integer
          description: Maximum number of transactions allowed.
          format: int32
          example: 12
        cumulativeLimit:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: >-
            Maximum allowed cumulative amount. Note that if 0 is passed for this
            field, no restrictions of the cumulativeLimit will be enforced.
          example: 1200
          format: float
        period:
          minLength: 5
          maxLength: 10
          type: string
          description: >-
            The Velocity period. Valid values are DAILY, WEEKLY, QUARTERLY,
            CONTINUOUS, MONTHLY, and YEARLY.
          example: DAILY
          pattern: ^(DAILY|WEEKLY|QUARTERLY|CONTINUOUS|MONTHLY|YEARLY)
        availableBalance:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: >-
            The cumulative spend available for the velocity control for the
            specified period.
          example: 1200
          format: float
          readOnly: true
        currencyType:
          minLength: 4
          maxLength: 8
          type: string
          description: Type of the currency being used. Valid values are BASE and MERCHANT.
          example: MERCHANT
          pattern: ^(BASE|MERCHANT)
        currencyCode:
          minLength: 3
          maxLength: 3
          pattern: ^[0-9]{3}$
          type: string
          description: >-
            Mastercard supported International Organization for Standardization
            (ISO) 4217 currency codes.
          example: '840'
        endDate:
          minLength: 16
          maxLength: 28
          type: string
          format: date-time
          description: >-
            End date until which the the control is valid. It should be in ISO
            Date Time with Offset format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
          readOnly: true
          example: '2020-10-06T11:09:42.000Z'
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          example: true
          default: false
      description: >-
        The VelocityControl can limit the frequency, and the total cumulative
        amount of authorizations performed on the cardholders account within a
        specified time period.
    ValidityPeriodControl:
      required:
        - from
        - negate
        - to
      type: object
      properties:
        from:
          minLength: 16
          maxLength: 28
          type: string
          format: date-time
          description: >-
            The start date from which the control is valid. It should be in ISO
            Date Time with Offset format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
          example: '2020-10-06T11:09:42.000Z'
        to:
          minLength: 16
          maxLength: 28
          type: string
          format: date-time
          description: >-
            The end date till which the the control is valid. It should be in
            ISO Date Time with Offset format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
          example: '2020-11-06T11:09:42.000Z'
        strictPreAuthCheck:
          type: boolean
          description: Defines if strict pre-auth check needs to be applied.
          default: false
          example: true
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
      description: >-
        The ValidityPeriod control provides the ability to limit authorization
        activity to a defined time period.
    AmountRangeControl:
      required:
        - currencyType
        - maxAmount
        - minAmount
        - negate
      type: object
      properties:
        minAmount:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: Minimum allowed amount
          format: float
          example: 1000
        maxAmount:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: Maximum allowed amount
          format: float
          example: 10000
        strictPreAuthCheck:
          type: boolean
          description: Defines if strict pre-auth check needs to be applied.
          default: false
          example: true
        currencyType:
          minLength: 4
          maxLength: 8
          type: string
          description: Type of the currency being used. Valid values are BASE and MERCHANT.
          example: MERCHANT
          pattern: ^(BASE|MERCHANT)
        currencyCode:
          minLength: 3
          maxLength: 3
          pattern: ^[0-9]{3}$
          type: string
          description: >-
            Mastercard supported International Organization for Standardization
            (ISO) 4217 currency codes.
          example: '840'
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
      description: >-
        The exact amount range control will approve a transaction only if the
        requested amount is equal or greater than MinAmount and less than or
        equal to MaxAmount. In other words, if Min Amount <= Amount <= Max
        Amount.
    Acceptors:
      required:
        - acquirerId
        - acceptorId
      type: object
      properties:
        acceptorId:
          minLength: 15
          maxLength: 15
          type: string
          description: The Merchant Id.
          example: '123456789012345'
        acquirerId:
          minLength: 1
          maxLength: 10
          pattern: .*\S.*
          type: string
          description: >-
            The Acquiring Institution ID Code which identifies the acquiring
            institution (for example, merchant bank) or its agent.
          example: '3'
    MerchantIdControl:
      required:
        - acceptors
        - negate
      type: object
      properties:
        acceptors:
          type: array
          items:
            $ref: '#/components/schemas/Acceptors'
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
      description: >-
        The Merchant ID control provides the ability to limit authorizations to
        particular merchants.
    AgeingVelocityControl:
      required:
        - authorizationHoldDays
        - cumulativeLimit
        - timeZone
        - negate
      type: object
      properties:
        authorizationHoldDays:
          type: integer
          minimum: 0
          maximum: 9999
          description: Number of days an authorization holds before ageing off.
          format: int32
          example: 1234
        cumulativeLimit:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: >-
            Maximum allowed cumulative amount. Note that if 0 is passed for this
            field, no restrictions of the cumulativeLimit will be enforced.
          example: 1000
          format: float
        timeZone:
          minLength: 3
          maxLength: 25
          type: string
          description: Time zone that is used for age-off calculations.
          example: UTC
        availableCredit:
          minimum: 0
          maximum: 99999999999999
          type: number
          description: >-
            The cumulative spend available for the velocity control for the
            specified period.
          example: 1000
          format: float
          readOnly: true
        currencyType:
          minLength: 4
          maxLength: 8
          type: string
          description: Type of the currency being used. Valid values are BASE and MERCHANT.
          example: MERCHANT
          pattern: ^(BASE|MERCHANT)
        currencyCode:
          minLength: 3
          maxLength: 3
          pattern: ^[0-9]{3}$
          type: string
          description: >-
            Mastercard supported International Organization for Standardization
            (ISO) 4217 currency codes.
          example: '840'
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
      description: >-
        The AgingVelocityControl provides the requester with the ability to set
        a notional credit line through the CumulativeControl. This control keeps
        track of the current remaining available credit and approves a
        transaction only if the requested amount is less than or equal to the
        remaining available credit.
    CurfewControl:
      required:
        - days
        - fromTime
        - negate
        - toTime
      type: object
      properties:
        fromTime:
          minLength: 5
          maxLength: 5
          pattern: ^([01][0-9]|2[0-3]):([0-5][0-9])$
          type: string
          description: The start time from which authorizations will be allowed.
          example: '08:20'
        toTime:
          minLength: 5
          maxLength: 5
          pattern: ^([01][0-9]|2[0-3]):([0-5][0-9])$
          type: string
          description: The end time at which authorizations will be allowed.
          example: '18:20'
        timeZone:
          minLength: 3
          maxLength: 25
          type: string
          description: Time zone that is used for age-off calculations.
          example: UTC
        days:
          maxItems: 7
          minItems: 1
          type: array
          description: >-
            Days of week. Valid values are SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
            THURSDAY, FRIDAY, and SATURDAY.
          example: SUNDAY
          pattern: ^(SUNDAY|MONDAY|TUESDAY|WEDNESDAY|THURSDAY|FRIDAY|SATURDAY)$
          items:
            type: string
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
      description: >-
        The following table lists the curfew control attributes details relevant
        to the example.
    MccControl:
      required:
        - mccs
        - negate
      type: object
      properties:
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
        mccs:
          minItems: 1
          type: array
          description: List of merchant category codes
          example:
            - '3001'
            - '3005'
          items:
            type: string
            example: items
      description: >-
        The Card Acceptor Business Codes (MCC) control can control the type of
        purchases for which a card is used.
    TimeOfDayControl:
      required:
        - negate
        - timeZone
        - times
      type: object
      properties:
        times:
          maxItems: 7
          minItems: 1
          type: array
          description: Times of day
          items:
            $ref: '#/components/schemas/TimeOfDay'
        timeZone:
          minLength: 3
          maxLength: 25
          type: string
          description: Time zone that is used for age-off calculations.
          example: UTC
        negate:
          type: boolean
          description: Defines if the rules should be negated.
          default: false
          example: true
      description: >-
        The TimeofDaycontrol provides the ability to limit authorization
        activity to defined time periods for each day.
    TimeOfDay:
      required:
        - day
        - fromTime
        - toTime
      type: object
      properties:
        day:
          minLength: 6
          maxLength: 9
          type: string
          example: SUNDAY
          description: >-
            Days of week. Valid values are SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
            THURSDAY, FRIDAY, and SATURDAY.
          pattern: ^(SUNDAY|MONDAY|TUESDAY|WEDNESDAY|THURSDAY|FRIDAY|SATURDAY)
        fromTime:
          minLength: 5
          maxLength: 5
          pattern: ^([01][0-9]|2[0-3]):([0-5][0-9])$
          type: string
          description: The start time from which authorizations will be allowed.
          example: '08:21'
        toTime:
          minLength: 5
          maxLength: 5
          pattern: ^([01][0-9]|2[0-3]):([0-5][0-9])$
          type: string
          description: The end time from which authorizations will be allowed.
          example: '21:00'
    MerchantNameControl:
      required:
        - negate
        - merchantNames
      type: object
      description: >-
        Allows you to limit authorizations to particular merchants by using the
        merchants name.
      properties:
        negate:
          type: boolean
          description: If negation applied
          default: false
          example: true
        merchantNames:
          type: array
          description: >-
            The card acceptor name as defined in field DE43 of the authorisation
            message.
          example:
            - Amazon
          uniqueItems: true
          items:
            type: string
          minLength: 1
          maxLength: 100
    TransactionEnvironmentControl:
      required:
        - negate
        - environmentCodes
      type: object
      description: Provides the ability to limit authorizations to particular environments.
      properties:
        negate:
          type: boolean
          description: If negation applied
          default: false
          example: true
        environmentCodes:
          type: array
          description: >-
            Environment codes; Valid values are ATM (Automated Teller Machine),
            ECOM (eCommerce), MOTO (Mail Order Telephone Order where neither
            card nor cardholder are present), PAYPASS (Contactless payment
            application), POS (Transaction where cardholder and card both
            present within a retail environment) and PWCB (Purchase with Cash
            Back)
          example:
            - ATM
          uniqueItems: true
          items:
            type: string
    DataElementControl:
      required:
        - negate
        - dataElement
        - values
      type: object
      description: >-
        Is used to evaluate certain data elements which provide information
        about the characteristics of card transactions.
      properties:
        negate:
          type: boolean
          description: If negation applied
          default: false
          example: true
        dataElement:
          type: string
          description: >-
            Data Element (DE); Valid values are PROCESSING_CODE, PAN_ENTRY_MODE
            and POS_TERM_CAPABILITY_INDICATOR. For processing code refer to
            [Mastercard Data Element
            Specification](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/index.html)
            Document. For PROCESSING_CODE refer to [field
            3.1](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE_003_SF_01_CardholderTransactionTypeCode.html).
            For PAN_ENTRY_MODE refer to [field
            22.1](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE022_SF01_POSTerminalPANEntryMode.html).
            For POS_TERM_CAPABILITY_INDICATOR refer to field
            [61.11](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE061_SF01_POSTerminalAttendance.html).
          example: PROCESSING_CODE
        values:
          type: array
          description: >-
            For processing code refer to the [Mastercard Data Element
            Specification](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/index.html)
            Document. For PROCESSING_CODE refer to field 3.1. For PAN_ENTRY_MODE
            refer to field 22.1. For POS_TERM_CAPABILITY_INDICATOR refer to
            field
            [61.11](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE061_SF01_POSTerminalAttendance.html).
          example:
            - '00'
            - '01'
          uniqueItems: true
          items:
            type: string
          minLength: 1
          maxLength: 2
    ApproveControl:
      type: object
      description: >-
        Manages if all others controls can be used or not. Typically used as a
        default approve rule to approve all authorizations.
      required:
        - negate
      properties:
        negate:
          type: boolean
          description: Defines if the controls should be negated
          example: true
          default: false
    EntryModeControl:
      required:
        - negate
        - modes
      type: object
      properties:
        modes:
          type: array
          description: >-
            Currently only one entry mode is supported which is Europay,
            Mastercard, Visa (EMV) chip acquired. Valid value is EMV
          items:
            type: string
            example: EMV
          uniqueItems: true
        negate:
          type: boolean
          description: If negation applied
          default: false
          example: true
      description: >-
        Provides the ability to limit authorizations to particular PAN entry
        modes.
    ReportParameters:
      type: object
      required:
        - dateTimeRangeFrom
        - dateTimeRangeTo
      properties:
        accountGuid:
          description: >-
            The globally unique identifier of the account. This is a required
            field if the account number is not provided in request body.
          type: string
          maxLength: 100
          minLength: 70
          example: >-
            0ENT53f1c33886359ddf78eea2a3d0c4d857815511e1ff2a39547bf1165eb28f914b1689083186
        dateTimeRangeFrom:
          description: >-
            Date Range From. Adheres to ISO Date Time with Offset format
            "yyyy-MM-dd"T"HH:mm:ss.SSSXXX".
          type: string
          format: date-time
          example: '2020-07-16T19:20:00.000Z'
        dateTimeRangeTo:
          description: >-
            Date Range To, Adheres to ISO ISO Date Time with Offset format
            "yyyy-MM-dd"T"HH:mm:ss.SSSXXX".
          type: string
          format: date-time
          example: '2020-08-16T19:20:42.000Z'
    AuthorizationReportCriteria:
      description: Authorization Report Search Criteria
      allOf:
        - type: object
          properties:
            accountNumber:
              description: >-
                Account Number(real card number or virtual card number). This is
                a required field if the account guid is not provided in request
                body.
              maxLength: 19
              minLength: 12
              pattern: ^[0-9]*$
              type: string
              example: '5395028436978594'
            unmaskedAccountNumber:
              type: boolean
              description: >-
                Based on the boolean value, Account number should be masked or
                unmasked in all the responses,by default this value is false.
              default: false
              example: true
        - $ref: '#/components/schemas/ReportParameters'
        - type: object
          properties:
            transactionType:
              type: string
              description: >-
                The transaction types that will be included in the authorisation
                report. Valid values are ALL, APPROVED, PARTIAL_APPROVED,
                DECLINED,ISSUER_DECLINED, REQUEST_RESPONSE, ADVICE_RESPONSE,
                REVERSAL_RESPONSE.
              example: ALL
    ClearingReportCriteria:
      description: Clearing Report Search Criteria
      allOf:
        - type: object
          properties:
            accountNumber:
              description: >-
                Account Number(real card number or virtual card number). This is
                a required field if account guid is not provided in request
                body.
              maxLength: 19
              minLength: 12
              pattern: ^[0-9]*$
              type: string
              example: '5395028436978594'
            unmaskedAccountNumber:
              type: boolean
              description: >-
                Based on the boolean value, Account number should be masked or
                unmasked in all the responses,by default this value is false.
              default: false
              example: true
        - $ref: '#/components/schemas/ReportParameters'
        - type: object
          properties:
            transactionType:
              type: string
              description: >-
                Indicates the type of transactions that need to be reported.
                Values that are valid are ALL, CHARGEBACK, PRESENTMENT,
                SECOND_PRESENTMENT,ARBITRATION_CHARGEBACK,RETRIEVAL_REQUEST,FEE_COLLECTION.
              example: ALL
    ClearingSummaryReportCriteria:
      description: Clearing Summary Report Search Criteria
      allOf:
        - type: object
          properties:
            accountNumber:
              description: >-
                Account Number (real card number). This is a required field if
                account guid is not provided in request body.
              maxLength: 19
              minLength: 12
              pattern: ^[0-9]*$
              type: string
              example: '5395028436978594'
            unmaskedAccountNumber:
              type: boolean
              description: >-
                Based on the boolean value, Account number should be masked or
                unmasked in all the responses,by default this value is false.
              default: false
              example: true
        - $ref: '#/components/schemas/ReportParameters'
    ClearingSummaryReportStatus:
      type: object
      allOf:
        - type: object
          properties:
            accountNumber:
              description: >-
                Account Number (real card number or virtual card number). This
                is a required field if account guid is not provided in request
                body.
              maxLength: 19
              minLength: 12
              type: string
              example: XXXXXXXXXXXX8594
        - $ref: '#/components/schemas/ReportParameters'
        - $ref: '#/components/schemas/ReportStatus'
    ClearingSummaryReportSummary:
      type: object
      allOf:
        - $ref: '#/components/schemas/ClearingSummaryReportStatus'
        - $ref: '#/components/schemas/ReportCompletionSummary'
    ReportStatus:
      type: object
      properties:
        reportGuid:
          description: The globally unique identifier for a particular report.
          type: string
          readOnly: true
          example: >-
            0ENT92fcefdfc144c5f5098ca57c3026e6295688e2061ccb9facdc310bbcdc5972d11644095460
          maxLength: 100
          minLength: 70
        createDate:
          description: >-
            Date when request was submitted,It should be in ISO Date Time with
            Offset format "yyyy-MM-dd"T"HH:mm:ss.SSSXXX".
          type: string
          format: date-time
          readOnly: true
          example: '2020-07-16T19:20:42.000Z'
        status:
          description: >-
            The current status of the requested report. Valid values are
            PENDING, ACTIVE, COMPLETED, FAILED, DELETED and TIMEOUT.
          type: string
          readOnly: true
          example: PENDING
    AuthorizationReportStatus:
      type: object
      allOf:
        - type: object
          properties:
            accountNumber:
              description: >-
                Account Number (real card number or virtual card number). This
                is a required field if account guid is not provided in request
                body.
              maxLength: 19
              minLength: 12
              type: string
              example: XXXXXXXXXXXX8594
        - $ref: '#/components/schemas/ReportParameters'
        - $ref: '#/components/schemas/ReportStatus'
        - type: object
          properties:
            transactionType:
              type: string
              description: >-
                The transaction types that will be included in the authorisation
                report. Values that are valid are ALL, APPROVED,
                PARTIAL_APPROVED, DECLINED,ISSUER_DECLINED, REQUEST_RESPONSE,
                ADVICE_RESPONSE, REVERSAL_RESPONSE.
              example: ALL
    ClearingReportStatus:
      type: object
      allOf:
        - type: object
          properties:
            accountNumber:
              description: >-
                Account Number (real card number or virtual card number). This
                is a required field if account guid is not provided in request
                body.
              maxLength: 19
              minLength: 12
              type: string
              example: XXXXXXXXXXXX8594
        - $ref: '#/components/schemas/ReportParameters'
        - $ref: '#/components/schemas/ReportStatus'
        - type: object
          properties:
            transactionType:
              type: string
              description: >-
                The transaction types that should be included in the Clearing
                Report. Values that are valid are ALL, CHARGEBACK, PRESENTMENT,
                SECOND_PRESENTMENT.
              example: ALL
    ReportCompletionSummary:
      type: object
      properties:
        recordCount:
          type: integer
          description: Number of records in report
          readOnly: true
          example: 6
        dataLimitExceeded:
          type: boolean
          description: >-
            Boolean field to indicate if the record count has exceeded the
            maximum limit.
          example: false
    AuthorizationReportSummary:
      type: object
      allOf:
        - $ref: '#/components/schemas/AuthorizationReportStatus'
        - $ref: '#/components/schemas/ReportCompletionSummary'
    ClearingReportSummary:
      type: object
      allOf:
        - $ref: '#/components/schemas/ClearingReportStatus'
        - $ref: '#/components/schemas/ReportCompletionSummary'
    AcceptorDetails:
      type: object
      properties:
        name:
          description: Name of the supplier.
          type: string
          readOnly: true
          example: RAILWAYS O'FALLON
          maxLength: 22
          minLength: 1
        cityName:
          description: City in which the merchant operates.
          type: string
          readOnly: true
          example: O'FALLON
          maxLength: 13
          minLength: 1
        subDivisionCode:
          description: >-
            Identifies the sub division code (such as state or province) code in
            POS and ATM transactions.
          type: string
          readOnly: true
          example: '353'
          maxLength: 3
          minLength: 1
        terminalId:
          description: Unique code identifying a terminal at the acceptor location.
          type: string
          readOnly: true
          example: DMSMTFRG
          maxLength: 8
          minLength: 8
        id:
          description: Identifies the acceptor ID assigned by the acquirer.
          type: string
          readOnly: true
          example: '497520000000000'
          maxLength: 15
          minLength: 15
        additionalMerchantName:
          description: >-
            Provides the merchant name associated with domestic Japanese
            transactions in Katakana.This attribute is populated from PDS0178
            (alternate card acceptor description data).
          type: string
          readOnly: true
          example: ���K
          maxLength: 201
          minLength: 1
        merchantCategoryCode:
          description: Merchant category code identifies the acceptors primary business.
          type: string
          readOnly: true
          example: '1644'
          maxLength: 4
          minLength: 4
        merchantCategoryCodeDescription:
          description: Description of the merchant category code
          type: string
          readOnly: true
          example: PASSENGER RAILWAYS
    AuthorizationAcceptor:
      allOf:
        - $ref: '#/components/schemas/AcceptorDetails'
        - type: object
          properties:
            environment:
              description: >-
                Transaction environment in which the transaction is processed.
                Possible values are UNKNOWN, POS, MOTO, ECOM, ATM, PAYPASS,
                PWCB.
              type: string
              readOnly: true
              example: ATM
            localDate:
              description: The local date in the request. Date format in MMDD.
              type: string
              readOnly: true
              example: '1006'
              maxLength: 4
              minLength: 4
            localTime:
              description: The local time of the request. Time format in hhmmss.
              type: string
              readOnly: true
              example: '100100'
              maxLength: 6
              minLength: 6
            retrievalReferenceNumber:
              description: >-
                Document reference number supplied by the system retaining the
                original source document of the transaction and assists in
                locating that source document or a copy thereof.
              type: string
              readOnly: true
              example: '105029956448'
              maxLength: 12
              minLength: 12
            posCountryCode:
              description: Identifies the country code in which merchant operates.
              type: string
              readOnly: true
              example: '840'
              maxLength: 3
              minLength: 3
            posCountryCodeDescription:
              description: Name of the country in which the merchant operates
              type: string
              readOnly: true
              example: UNITED STATES
              maxLength: 100
              minLength: 1
            amount:
              $ref: '#/components/schemas/CurrencyAmount'
    ClearingAcceptor:
      allOf:
        - $ref: '#/components/schemas/AcceptorDetails'
        - type: object
          properties:
            countryCode:
              description: Identifies the country code in which merchant operates.
              type: string
              readOnly: true
              example: '840'
              maxLength: 3
              minLength: 3
            countryCodeDescription:
              description: Name of the country in which the merchant operates.
              type: string
              readOnly: true
              example: UNITED STATES
              maxLength: 100
              minLength: 1
            retrievalReferenceNumber:
              description: Identifies in locating transaction original source information.
              type: string
              readOnly: true
              example: '105029956448'
              maxLength: 12
              minLength: 12
            streetAddress:
              description: Street address at which the acceptor operates.
              type: string
              readOnly: true
              example: 2400 Market St
              maxLength: 48
              minLength: 1
            postalCode:
              description: Postal code in which the merchant operates.
              type: string
              readOnly: true
              example: '10001'
              maxLength: 10
              minLength: 1
            amount:
              $ref: '#/components/schemas/CurrencyAmount'
    AuthorizationProcessorDetails:
      allOf:
        - $ref: '#/components/schemas/ProcessorDetails'
        - type: object
          properties:
            result:
              description: >-
                Numeric representation of the authorisation result.  Refer to
                the codes and formats section  for all possible values
              type: integer
              readOnly: true
              example: 0
              maxLength: 2
              minLength: 1
            resultDescription:
              description: Textual representation of result id.
              type: string
              readOnly: true
              example: Approval
              maxLength: 100
              minLength: 1
            appliedDateTime:
              description: >-
                Time when the transaction was processed. Adheres to ISO Date
                Time with Offset format, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
              type: string
              readOnly: true
              format: date-time
              example: '2018-12-17T11:09:42.000Z'
            responseCode:
              description: >-
                Two-character alphanumeric reason code received from the
                processor in outgoing advice/reversal messages. For all possible
                values refer to Customer Interface Specification, [Data Element
                39
                (DE-39)](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE039_ResponseCode.html).
              type: string
              readOnly: true
              example: '17'
            onBehalfResult:
              description: >-
                Letter representing the decision that has been made. This value
                is derived from DE-48 SF71 subfield-1. For all possible values
                refer to Customer Interface Specification field name DE-48 SF71.
              type: string
              readOnly: true
              example: L
            onBehalfService:
              description: >-
                This field notifies the issuer of the On-behalf Service
                performed on the transaction and the results. This value is
                derived from DE-48 SF71 subfield-2. For all possible values
                refer to Customer Interface Specification field name DE-48 SF71.
              type: string
              readOnly: true
              example: '33'
    ProcessorDetails:
      type: object
      properties:
        issuerId:
          description: Unique identifier of the issuer
          type: integer
          readOnly: true
          example: 901
    ClearingProcessorDetails:
      allOf:
        - $ref: '#/components/schemas/ProcessorDetails'
        - type: object
          properties:
            isMatched:
              description: >-
                Denotes if transaction is settled. Value is TRUE when
                transaction is Settled and FALSE when value is Unsettled.
              type: boolean
              readOnly: true
              example: true
            originalTransactionId:
              description: Transaction ID of the original transaction.
              type: integer
              format: int64
              readOnly: true
              example: 0
            isMastercardSwitched:
              description: Denotes if the transaction is switched by Mastercard.
              type: boolean
              readOnly: true
              example: true
            controlsAppliedDateTime:
              description: >-
                Time on which the payment was settled. Adheres to ISO Date Time
                with Offset format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
              type: string
              readOnly: true
              format: date-time
              example: '2019-07-03T11:09:42.000Z'
    TransactionDetails:
      type: object
      properties:
        acquirerInstitutionIdCode:
          description: Interbank Card Association ID of the acquirer.
          type: integer
          format: int64
          readOnly: true
          example: 999686
          maxLength: 11
          minLength: 1
        forwardingInstitutionIdCode:
          description: Interbank Card Association ID of the processor.
          type: integer
          format: int64
          readOnly: true
          example: 4975200000
          maxLength: 11
          minLength: 6
        conversionRateCardholderBilling:
          description: Currency exchange rate in operation during payment.
          type: number
          readOnly: true
          example: 22
        processingCode:
          description: >-
            Code describes the effect of a transaction on a customer account and
            the type of accounts affected.
          type: string
          readOnly: true
          example: '200000'
          maxLength: 6
          minLength: 6
    ClearingTransactionDetails:
      allOf:
        - $ref: '#/components/schemas/TransactionDetails'
        - type: object
          properties:
            authCode:
              description: Indicate authorization approval code of the issuer.
              type: string
              readOnly: true
              example: '015489'
              maxLength: 6
              minLength: 6
            destinationInstitutionIdCode:
              description: Identity of the institution receiving the request.
              type: integer
              format: int64
              readOnly: true
              example: 614350
              maxLength: 11
              minLength: 6
            dateTimeTransactionLocal:
              description: >-
                Time at which the transaction takes place at the acceptor
                location. Adheres to ISO Date Time with Offset format
                "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".
              type: string
              readOnly: true
              format: date-time
              example: '2020-07-16T11:09:42.000Z'
            settlementAmount:
              $ref: '#/components/schemas/CurrencyAmount'
            reversalIndicator:
              description: Reversal of a clearing.
              type: string
              readOnly: true
              example: Credit
            clearingTransactionId:
              description: Unique transaction identifier.
              type: integer
              format: int64
              readOnly: true
              example: 6693702785
            authorizationTransactionId:
              description: Processor authorization transaction id.
              type: integer
              format: int64
              readOnly: true
              example: 182447
    AuthorizationTransactionDetails:
      allOf:
        - $ref: '#/components/schemas/TransactionDetails'
        - type: object
          properties:
            dateTime:
              description: >-
                Time at which the transaction happens, adheres to ISO Date Time
                with Offset format "MM-dd'T'HH:mm:ss.SSSXXX".
              type: string
              readOnly: true
              example: 01-08T18:01:52.000Z
            mtIdType:
              description: >-
                Indicates the message type. Valid values include 0100 - Auth,
                0120 - Advice, 0400 - Reversal , 0420 - Reversal Advice.
              type: string
              readOnly: true
              example: '0100'
            type:
              description: >-
                Indicates the type of transaction. Valid values include 0 =
                Auth, 1 = Advice, 2 = Reversal, 3 = Reversal advice, 4 = Offline
                Auth, 5 = Offline purchase return, 8 = Offline Auth for purchase
                return. Transaction types 6 & 7 are reserved for internal use.
              type: string
              readOnly: true
              example: '0'
            subType:
              description: >-
                Transaction Sub Type is the information requested by user. Valid
                values include  0 = Regular, 1 = PreAuth, 2 = AVS-only.
              type: string
              readOnly: true
              example: '1'
            environment:
              description: >-
                Describes the type of transaction environment. Possible values
                are UNKNOWN, POS, MOTO, ECOM, ATM, PAYPASS, PWCB.
              type: string
              readOnly: true
              example: ATM
            issuerResponse:
              description: >-
                Two-character alphanumeric reason code received from the issuer
                in incoming Advice/Reversal messages. For all possible values
                refer to the Customer Interface Specification, [Data Element 39
                (DE-39)](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE039_ResponseCode.html).
              type: string
              readOnly: true
              example: '00'
            avsResponseCode:
              description: >-
                AVS Response Code is Address Verification Service Response. For
                all possible values refer to the Customer Interface
                Specification, [Data Element 48,Subfield 83 (DE-48
                SF83)](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE048_SE83_AddressVerificationSvcRsp.html).
              type: string
              readOnly: true
              example: '0'
            systemTraceAuditNumber:
              description: >-
                Unique six-digit identifier generated by the Acquirer, must be
                the same in the Advice, will be different for the reversal.
              type: string
              readOnly: true
              example: '000071'
              maxLength: 6
              minLength: 6
            isMatched:
              description: >-
                Value is true if the Authorization matches with a clearing
                record.
              type: boolean
              readOnly: true
              example: true
            partialApprovedAmount:
              description: For Partial Approved transactions, the Amount approved.
              type: number
              readOnly: true
              example: 500
              maximum: 9999999999
              minimum: 0
            reversal:
              $ref: '#/components/schemas/Reversal'
            authorizationTransactionId:
              description: Processor authorization transaction id
              type: integer
              format: int64
              readOnly: true
              example: 182447
            posEntryMode:
              description: Transaction POS Entry Mode.
              type: string
              readOnly: true
              example: '810'
              maxLength: 3
              minLength: 3
    Reversal:
      type: object
      properties:
        transactionId:
          description: >-
            The transactionId of the transaction that is being reversed. Only
            present for Reversals
          readOnly: true
          type: integer
          format: int64
          example: 190191
        type:
          description: >-
            Indicates whether it is a full reversal or a partial reversal, 0 =
            FULL, 1 = PARTIAL.
          type: string
          readOnly: true
          example: '0'
        replacementTransactionAmount:
          description: Reversal Transaction Amount in case of a partial reversal.
          type: number
          readOnly: true
          example: 500
          maximum: 9999999999
          minimum: 0
        replacementCardholderAmount:
          description: Reversal Cardholder Amount in case of a partial reversal
          type: number
          readOnly: true
          example: 500
          maximum: 9999999999
          minimum: 0
        appliedDateTime:
          description: >-
            Time when the response for Advice/Reversal has been processed on the
            updated Auth. Adheres to ISO Date Time with Offset format
            yyyy-MM-dd'T'HH:mm:ss.SSSXXX
          type: string
          readOnly: true
          format: date-time
          example: '2020-07-16T11:09:42.000Z'
    CurrencyAmount:
      type: object
      properties:
        amount:
          description: Amount of currency.
          type: number
          readOnly: true
          example: 500
          maximum: 9999999999
          minimum: 0
        currencyCode:
          description: >-
            Mastercard supported International Organization for Standardization
            (ISO) 4217 currency codes.
          type: string
          readOnly: true
          example: '978'
          maxLength: 3
          minLength: 3
          pattern: ^[0-9]{3}$
        currencyCodeAlphabetic:
          description: Indicates ISO 4217 currency code description.
          type: string
          readOnly: true
          example: EUR
          maxLength: 3
          minLength: 3
    VirtualCard:
      type: object
      properties:
        number:
          description: Virtual Card Number.
          type: string
          readOnly: true
          example: XXXXXXXXXXXX9117
        expiry:
          description: Virtual Card expiry date in yyyy-MM format.
          type: string
          readOnly: true
          example: 2020-07
          maxLength: 7
          minLength: 7
    FundingSourceDetails:
      type: object
      properties:
        alias:
          description: Alias for the funding source
          type: string
          readOnly: true
          example: SampleFundingSource
          maxLength: 400
          minLength: 1
    RealCard:
      type: object
      properties:
        number:
          description: Real Card Number
          type: string
          readOnly: true
          example: XXXXXXXXXXXX3878
        expiry:
          description: Real Card expiry date in yyyy-MM format.
          type: string
          readOnly: true
          example: 2020-07
          maxLength: 7
          minLength: 7
    ReportData:
      type: object
      properties:
        type:
          description: Indicates if the transaction is a Debit or a Credit.
          type: string
          readOnly: true
          example: Debit
        acquirerReferenceData:
          description: >-
            Reference Data an acquirer supplies in an acquirer-originated
            message that may be required for an issuer to return to the acquirer
            in a subsequent message. For more details refer to the Customer
            Interface Specification, [Data Element 31
            subfields](https://w201.mastercardconnect.com/hsm3ca267/homememb/library/shared/ENG/CI/suitehelp/r_DE031_AmountSettlementProcFee.html).
          type: string
          readOnly: true
          example: '08401210281000000000011'
          maxLength: 23
          minLength: 23
        messageTypeId:
          description: >-
            Indicates type of message being interchanged. Possible values are
            1240-Presentment, 1442-Chargeback, 1644-Administrative, 1740-Fee
            Collection.
          type: integer
          readOnly: true
          example: 1240
          maxLength: 4
          minLength: 4
        functionCode:
          description: >-
            Indicates the specific purpose of message. For all possible value
            refer to Customer Interface Specification field name DE-24.
          type: integer
          readOnly: true
          example: 200
          maxLength: 3
          minLength: 3
        messageReasonCode:
          description: >-
            Provides the message receiver with the reason for sending the
            message. For all possible value refer to Customer Interface
            Specification field name DE-25.
          type: integer
          readOnly: true
          example: 1401
          maxLength: 4
          minLength: 4
    AuthorizationResource:
      type: object
      properties:
        processor:
          $ref: '#/components/schemas/AuthorizationProcessorDetails'
        realPaymentCard:
          $ref: '#/components/schemas/RealCard'
        virtualPaymentCard:
          $ref: '#/components/schemas/VirtualCard'
        acceptor:
          $ref: '#/components/schemas/AuthorizationAcceptor'
        cardHolderAmount:
          allOf:
            - $ref: '#/components/schemas/CurrencyAmount'
            - type: object
              properties:
                effectOnBalance:
                  description: The delta on the card holder amount
                  type: number
                  readOnly: true
                  example: 100
                  maximum: 9999999999
        transactionInformation:
          $ref: '#/components/schemas/AuthorizationTransactionDetails'
        fundingSource:
          $ref: '#/components/schemas/FundingSourceDetails'
    ClearingResource:
      type: object
      properties:
        processor:
          $ref: '#/components/schemas/ClearingProcessorDetails'
        realPaymentCard:
          $ref: '#/components/schemas/RealCard'
        virtualPaymentCard:
          $ref: '#/components/schemas/VirtualCard'
        acceptor:
          $ref: '#/components/schemas/ClearingAcceptor'
        cardHolderAmount:
          $ref: '#/components/schemas/CurrencyAmount'
        transactionInformation:
          $ref: '#/components/schemas/ClearingTransactionDetails'
        clearing:
          $ref: '#/components/schemas/ReportData'
        fundingSource:
          $ref: '#/components/schemas/FundingSourceDetails'
    Authorization:
      type: object
      properties:
        subject:
          description: Type of report
          type: string
          readOnly: true
          example: PAYMENT_AUTHORIZATION
        content:
          $ref: '#/components/schemas/AuthorizationResource'
    Clearing:
      type: object
      properties:
        subject:
          description: Type of report
          type: string
          readOnly: true
          example: PAYMENT_CLEARING
        content:
          $ref: '#/components/schemas/ClearingResource'
    ClearingSummaryVirtualPaymentCardResource:
      type: object
      properties:
        number:
          description: Virtual Card Number.
          type: string
          readOnly: true
          example: XXXXXXXXXXXX9117
        currencyCode:
          description: The Issuer Currency Code.
          type: string
          readOnly: true
          example: '978'
          maxLength: 3
          minLength: 3
          pattern: ^[0-9]{3}$
        currencyCodeAlphabetic:
          description: Indicates ISO 4217 currency code description.
          type: string
          readOnly: true
          example: EUR
          maxLength: 3
          minLength: 3
        availableBalance:
          description: >-
            The cumulative spend available for the velocity control for the
            specified period.
          type: number
          readOnly: true
          example: 500
          maximum: 9999999999
          minimum: 0
    AccountEndUser:
      type: object
      required:
        - firstName
        - lastName
        - email
        - phone
      properties:
        firstName:
          type: string
          minLength: 1
          maxLength: 100
          pattern: .*\S.*
          description: The first name of the virtual card holder
          example: John
        lastName:
          type: string
          minLength: 1
          maxLength: 100
          pattern: .*\S.*
          description: The last name of the virtual card holder
          example: Smith
        email:
          type: string
          minLength: 1
          maxLength: 300
          pattern: ^[\w\-\.]{1,64}@([\w-]+\.)+[\w-]{2,4}$
          description: The email address of the virtual card holder
          example: john.smith@email.com
        phone:
          type: string
          minLength: 6
          maxLength: 15
          pattern: ^\+[1-9]{1}\d{2,14}$
          description: >-
            The phone number of the virtual card holder(+ at the beginning is
            required)
          example: '+4402030484377'
    ClearingSummaryVirtualPaymentCard:
      allOf:
        - $ref: '#/components/schemas/ClearingSummaryVirtualPaymentCardResource'
        - type: object
    ClearingSummaryAccountControl:
      type: object
      properties:
        ruleAction:
          description: >-
            Attribute to indicate the results of the ruleAction with possible
            results of APPROVE and DECLINE.
          type: string
          readOnly: true
          example: APPROVE
        ruleAlias:
          description: >-
            If provided, returns the history for a specific rule in the rule
            set. Otherwise, the history is returned for all rules.
          type: string
          readOnly: true
          example: OP_Modified
        cumulativeLimit:
          description: The cumulative limit for the associated card.
          type: string
          readOnly: true
          example: '17.5'
        controlTypeId:
          description: >-
            Denotes the control type. For all possible values refer to
            In-Control Spend Control Rules documentation in the Business Payment
            Controls API on Mastercard Developers.
          type: string
          readOnly: true
          example: MCC_CONTROL
    ClearingSummaryAuthorization:
      type: object
      properties:
        numberOfAuthorizations:
          description: Number of authorizations.
          type: number
          readOnly: true
          example: 10
        lastAuthDate:
          description: Last Authorization date.
          type: string
          readOnly: true
          example: '2020-05-07T22:14:32.000Z'
        amount:
          description: Amount of currency.
          type: number
          readOnly: true
          example: 500
          maximum: 9999999999
          minimum: 0
    ClearingSummaryClearing:
      type: object
      properties:
        numberOfClearings:
          description: Number of clearings.
          type: number
          readOnly: true
          example: 20
        lastClearedDate:
          description: Last Clearing date.
          type: string
          readOnly: true
          example: '2020-05-07T22:14:32.000Z'
          format: date-time
        period:
          description: >-
            The frequency is the number of times the card can be authorized.
            Possible values are Daily, Weekly, Monthly, Quarterly, Yearly and
            Continuous.
          type: string
          readOnly: true
          example: Daily
        amount:
          description: Amount of currency.
          type: number
          readOnly: true
          example: 500
          maximum: 9999999999
          minimum: 0
    ClearingSummaryResource:
      type: object
      properties:
        virtualPaymentCard:
          $ref: '#/components/schemas/ClearingSummaryVirtualPaymentCard'
        accountControl:
          $ref: '#/components/schemas/ClearingSummaryAccountControl'
        authorization:
          $ref: '#/components/schemas/ClearingSummaryAuthorization'
        clearing:
          $ref: '#/components/schemas/ClearingSummaryClearing'
    ClearingSummary:
      type: object
      properties:
        subject:
          description: Type of Clearing Report.
          type: string
          readOnly: true
          example: CLEARING_SUMMARY
        content:
          $ref: '#/components/schemas/ClearingSummaryResource'
    CustomData:
      type: object
      required:
        - customDataFields
        - ownerGuid
      description: Custom Data
      properties:
        customDataGuid:
          maxLength: 100
          minLength: 1
          pattern: ^[A-Za-z0-9_=-]+$
          type: string
          description: The globally unique identifier for a custom data collection
          example: >-
            0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
          readOnly: true
        ownerGuid:
          maxLength: 100
          minLength: 1
          pattern: ^[A-Za-z0-9_=-]+$
          type: string
          description: The globally unique identifier of the owner
          example: >-
            SENTTY000008E016729005A4AC526BAEA6BA06D27984F5716ABAC04488423A028202781503527635C2
        customDataAlias:
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          type: string
          description: The alias for the custom data collection
          example: June Travel Expenses
        customDataFields:
          type: array
          minItems: 1
          description: Custom Data Fields
          items:
            $ref: '#/components/schemas/CustomDataField'
        createdDate:
          type: string
          description: Timestamp of creation date.
          format: date-time
          example: '2020-10-06T11:09:42.10+01:00'
        lastUpdateDate:
          type: string
          description: Timestamp of last update.
          format: date-time
          example: '2020-10-06T11:09:42.10+01:00'
    CustomDataField:
      type: object
      description: Name,Value Pairs making up the custom data collection
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: The name of custom data field
          minLength: 1
          example: Cost Center
        value:
          type: string
          description: >-
            The value of custom data field. Do not use PII data as part of
            custom data field value.
          minLength: 1
          example: AL24
    CustomDataSearch:
      type: object
      description: Custom Data Search resource object
      properties:
        issuerGuids:
          type: array
          description: Lists issuer guids
          example:
            - >-
              SENTTY000008E016729005A4AC526BAEA6BA06D27984F5716ABAC04488423A028202781503527635I1
            - >-
              SENTTY000008E016729005A4AC526BAEA6BA06D27984F5716ABAC04488423A028202781503527635I2
          items:
            type: string
        corpGuids:
          type: array
          description: Lists corporate guids
          example:
            - >-
              SENTTY000008E016729005A4AC526BAEA6BA06D27984F5716ABAC04488423A028202781503527635C2
            - >-
              SENTTY000008E016729005A4AC526BAEA6BA06D27984F5716ABAC04488423A028202781503527635C4
          items:
            type: string
        customDataGuids:
          type: array
          description: List with custom data guids
          example:
            - >-
              0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
            - >-
              0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683927550
          items:
            type: string
        customDataAliases:
          type: array
          description: List with custom data aliases
          example:
            - CustomDataAlias123
            - CustomDataAlias456
          items:
            type: string
        pagination:
          $ref: '#/components/schemas/SimplePagination'
    BasicCustomDataSearch:
      type: object
      description: Custom Data Search response object
      properties:
        customDataGuid:
          maxLength: 100
          minLength: 1
          pattern: ^[A-Za-z0-9_=-]+$
          type: string
          description: The globally unique identifier for a custom data collection
          example: >-
            0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
        issuerGuid:
          maxLength: 100
          minLength: 1
          pattern: ^[A-Za-z0-9_=-]+$
          type: string
          description: The globally unique identifier of the issuer.
          example: >-
            SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE8238572375
        corpGuid:
          maxLength: 100
          minLength: 1
          pattern: ^[A-Za-z0-9_=-]+$
          type: string
          description: The globally unique identifier of the corporate.
          example: >-
            SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE8238572375
        customDataAlias:
          maxLength: 100
          minLength: 1
          pattern: .*\S.*
          type: string
          description: The alias for the custom data collection
          example: June Travel Expenses
        customDataFields:
          type: array
          description: Custom Data Fields
          minItems: 1
          items:
            $ref: '#/components/schemas/CustomDataField'
        createdDate:
          type: string
          description: Timestamp of creation date.
          format: date-time
          example: '2020-10-06T11:09:42.10+01:00'
        lastUpdateDate:
          type: string
          description: Timestamp of last update.
          format: date-time
          example: '2020-10-06T11:09:42.10+01:00'
    SimplePagination:
      type: object
      properties:
        page:
          maximum: 999
          minimum: 0
          type: integer
          description: The page number being requested.
          example: 1
        pageLength:
          minimum: 1
          maximum: 200
          type: integer
          description: The size of the page being requested (between 1 and 200)
          example: 20
    RetailApiMigrationStatus:
      type: object
      properties:
        accountGuid:
          description: The globally unique identifier of the card account.
          type: string
          example: >-
            0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
        fundingSourceGuid:
          description: The globally unique identifier of the funding source.
          type: string
          example: >-
            0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
        active:
          description: Defines if the account is active.
          type: boolean
          example: true
      description: Response data for single record from migration request.
    RetailApiMigrationToken:
      required:
        - ownerGuid
        - accountType
      type: object
      properties:
        ownerGuid:
          description: >-
            The globally unique identifier of the entity under which the card is
            registered.  The ownerGUID is the same as the Issuer GUID or Corp
            GUID.
          type: string
          example: SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
          minLength: 1
          maxLength: 100
        cpnId:
          description: >-
            CPNID is a proxy card identifier. It is an internal unique ID that
            is assigned to each card in Retail API.
          type: string
          example: '1234567890'
          minLength: 1
          maxLength: 100
          pattern: ^[0-9]*$
        accountNumber:
          maxLength: 19
          minLength: 16
          pattern: ^[0-9]*$
          type: string
          description: >-
            The card number. This is associated real card number  or virtual
            card number for cards already created in Retail API.
          example: '1234567890123456700'
        accountType:
          description: >-
            The type of the account, valid values are 'RCN' for real cards and
            'VCN' for virtual cards.
          type: string
          example: RCN
          pattern: ^RCN|VCN$
          enum:
            - RCN
            - VCN
      description: Request body to request migrating a single record.
    Entity:
      type: object
      required:
        - entityGuid
        - parentGuid
        - name
        - entityType
        - entityStatus
      properties:
        entityGuid:
          description: >-
            The unique identifier for your entity. As an example, if the parent
            entity is an Issuer, then the descendant entity will be a Company
          example: >-
            SENTTYFA86E62DE08B3961BB74AAFD1E4827315091261068627DBBDA334CDAD1572DEB1680755340
          type: string
        parentGuid:
          description: >-
            The unique identifier for your entity's parent entity. As an
            example, if the entity is a Company, then the parent entity will be
            an Issuer
          example: >-
            SENTTY27A8719BE0A622F48E2A0AF1AE713171175AD8B3D4FAC64183E12F6D606385C71519036959
          type: string
        name:
          description: The name of the entity as set-up in the platform
          example: ABC Enterprises
          type: string
        nameLine2:
          description: The second line of the entitys name as set-up in the platform
          example: ABC Travel
          type: string
        entityType:
          description: >-
            The type of the entity. Possible values are COMPANY, COMPANY_GROUP,
            ISSUER and ISSUER_GROUP
          example: COMPANY
          type: string
        entityStatus:
          description: >-
            The current status of the entity. Possible values are ACTIVE and
            INACTIVE
          example: ACTIVE
          type: string
        ica:
          description: >-
            If the entity is an Issuer, ICA will be returned. If the entity is a
            descendant of Issuer, then the parent issuer's ICA will be returned
          example: 1902
          type: integer
          format: int64
        alternateName:
          description: The alternate name of the entity as set up in the platform
          example: AKA Enterprises
          type: string
        alternateNameLine2:
          description: >-
            The second line of the entitys alternate name as set up in the
            platform
          example: AKA Travel
          type: string
        additionalInformation:
          description: Additional information about the entity as set up in the platform
          example: Additional Information
          type: string
        createdDateTime:
          description: Entity creation date
          type: string
          format: date-time
          example: '2020-10-06T11:09:42.100Z'
    EntitySearchResource:
      type: object
      required:
        - count
        - offset
        - limit
        - total
      properties:
        count:
          description: The number of entities returned in the response
          example: 4
          type: integer
          format: int64
        offset:
          description: >-
            The number of entities you asked the start of the list to be offset
            from
          example: 0
          type: integer
          format: int64
        limit:
          description: The number of entities you asked the list to be limited to
          example: 25
          type: integer
          format: int64
        total:
          description: The total number of entities matching the search criteria
          example: 100
          type: integer
          format: int64
        items:
          type: array
          description: List of entities matching the search criteria
          items:
            $ref: '#/components/schemas/Entity'
    ErrorWrapper:
      required:
        - Errors
      type: object
      properties:
        Errors:
          $ref: '#/components/schemas/Errors'
      example:
        Errors:
          Error:
            - Source: some-service
              ReasonCode: field.invalid
              Description: Resource GUID does not exist
              Recoverable: false
              Details: resourceGuid
    Errors:
      type: object
      required:
        - Error
      properties:
        Error:
          $ref: '#/components/schemas/ErrorList'
    ErrorList:
      type: array
      minItems: 1
      description: List of errors returned from server.
      items:
        $ref: '#/components/schemas/Error'
    Error:
      type: object
      properties:
        Source:
          description: >-
            An element used to indicate the source of the issue causing this
            error.
          type: string
          example: format.invalid
        ReasonCode:
          description: A reason code for the error that has occurred.
          type: string
          example: field.required
        Description:
          description: Description of the reason the operation failed.
          type: string
          example: We could not handle your request
        Recoverable:
          description: >-
            Generated by the gateway to indicate if the request could presented
            again for processing. Either 'true' or 'false'.
          type: boolean
          example: false
        Details:
          description: Identifies the description of the error.
          type: string
          example: accountGuid is required but is missing
      required:
        - Source
        - ReasonCode
        - Description
        - Recoverable
  responses:
    BadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: cpnId.and.accountNumber.not.allowed.together
                  Recoverable: false
                  Details: >-
                    The request's CpnId and AccountNumber cannot be used
                    together
    VirtualCardBadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: field.required
                  Description: fundingSourceGuid is a required field and must be populated
                  Recoverable: false
                  Details: fundingSourceGuid
    BadStatusRequestError:
      description: Invalid Status
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: status.invalid.must.be.ACTIVE.or.BLOCKED
                  Description: Valid values are ACTIVE and BLOCKED
                  Recoverable: false
                  Details: status
    CardSearchBadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: pattern.invalid
                  Description: accountNumber has invalid pattern
                  Recoverable: false
                  Details: accountNumber
    ContactBadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: length.long
                  Description: Field Length of countryCode is too long
                  Recoverable: false
                  Details: countryCode
    RealCardBadRequestError:
      description: Invalid OwnerGuid Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: field.invalid
                  Description: Owner GUID does not exist
                  Recoverable: false
                  Details: ownerGuid
    FundingSourceBadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: field.unrecognized
                  Description: Field name is incorrect
                  Recoverable: false
                  Details: foo
    AccountBadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: session.sessionId.missing
                  Description: The sessionId session state is missing
                  Recoverable: false
    AccountUnauthorizedError:
      description: Authentication Required
      headers:
        WWW-Authenticate:
          description: Method of authentication
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: user.authentication.absent
                  Description: No authentication data was found for the user
                  Recoverable: false
    AccountForbiddenError:
      description: Not Authorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: user.authorization.missing
                  Description: >-
                    No authorization data was found for the user or their
                    session
                  Recoverable: false
    RealCardNotFoundError:
      description: Real Card Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: resource.not.found
                  Description: Real Card not found
                  Recoverable: false
    VirtualCardNotFoundError:
      description: Virtual Card Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: resource.not.found
                  Description: Virtual Card not found
                  Recoverable: false
    FundingSourceNotFoundError:
      description: Funding Source Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: resource.not.found
                  Description: Funding Source not found
                  Recoverable: false
    ResourceNotFoundError:
      description: Resource Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: account-service
                  ReasonCode: resource.not.found
                  Description: Resource not found
                  Recoverable: false
    ReportingServiceBadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: accounts-reporting-service
                  ReasonCode: account.number.pattern.invalid
                  Description: Account Number pattern is invalid
                  Recoverable: false
    PaginationOffSetBadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: accounts-reporting-service
                  ReasonCode: offset.invalid
                  Description: Pagination Offset value is invalid
                  Recoverable: false
    GuidInvalidBadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: accounts-reporting-service
                  ReasonCode: reportGuid.invalid
                  Description: Report GUID is invalid
                  Recoverable: false
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: Gateway
                  ReasonCode: DECLINED
                  Description: Unauthorized - Access Not Granted
                  Recoverable: false
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: accounts-reporting-service
                  ReasonCode: user.authorization.missing
                  Description: >-
                    No authorization data was found for the user or their
                    session
                  Recoverable: false
    NotFoundError:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: accounts-reporting-service
                  ReasonCode: reportGuid.notfound
                  Description: Report GUID not found
                  Recoverable: false
    RealCardAccount:
      description: Real Card Account
      headers:
        Location:
          $ref: '#/components/headers/Real-Card-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardAccount'
          example:
            accountGuid: >-
              0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
            expiry: 2031-11
            active: true
            createdDate: '2023-11-28T15:17:42.920Z'
            lastUpdateDate: '2023-11-28T15:17:42.920Z'
            applicationSource: bpc
            nameOnCard: John Doe
            ownerGuid: >-
              SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            authorizationControlsEnabled: true
            accountNumber: '5569507890123457042'
    RealCardDetails:
      description: Real Card Account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardAccount'
          example:
            accountGuid: >-
              0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
            expiry: 2031-11
            active: true
            createdDate: '2023-11-28T15:17:42.920Z'
            lastUpdateDate: '2023-11-28T15:17:42.920Z'
            applicationSource: bpc
            nameOnCard: John Doe
            ownerGuid: >-
              SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            authorizationControlsEnabled: true
            accountNumber: XXXXXXXXXXXXXXX7042
            billingCurrency: '826'
            billingCurrencyAlphabetic: GBP
    RealCardAccountUpdate:
      description: Real Card Account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardAccount'
          example:
            accountGuid: >-
              0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
            expiry: 2041-12
            active: true
            createdDate: '2023-11-28T15:17:42.920Z'
            lastUpdateDate: '2023-11-28T15:17:42.920Z'
            applicationSource: bpc
            nameOnCard: John Doe
            ownerGuid: >-
              SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            authorizationControlsEnabled: true
            accountNumber: '5234567890123457042'
            billingCurrency: '826'
            billingCurrencyAlphabetic: GBP
    VirtualCardAccount:
      description: Virtual Card Account
      headers:
        Location:
          $ref: '#/components/headers/Virtual-Card-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardAccount'
          examples:
            virtualCardWithSimpleRule:
              $ref: '#/components/examples/virtualCardWithSimpleRuleResponse'
            virtualCardWithComplexRule:
              $ref: '#/components/examples/virtualCardWithComplexRuleResponse'
    VirtualCardDetails:
      description: Virtual Card Account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardAccount'
          examples:
            complexRules:
              summary: Virtual Card With Complex Rules
              value:
                accountGuid: >-
                  0ENT6d8f279532fff6e27c31b2bc3e04eb59a7799ebabd130757b0129bc2fa029b2b1702046890
                expiry: 2024-11
                billingCurrency: '826'
                billingCurrencyAlphabetic: GBP
                active: true
                createdDate: '2020-10-06T11:09:42.000Z'
                lastUpdateDate: '2020-10-06T11:09:42.000Z'
                fundingSourceGuid: >-
                  0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
                ownerGuid: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
                cvc: '123'
                rules:
                  inControlRules:
                    - action: APPROVE
                      alias: Virtual Card Complex Update
                      geographies:
                        - countryCodes:
                            - '076'
                            - '724'
                          negate: false
                      acceptorIds:
                        - negate: false
                          acceptors:
                            - acceptorId: '123451234512344'
                              acquirerId: '123123'
                      curfews:
                        - fromTime: '06:00'
                          toTime: '11:00'
                          timeZone: MIT
                          days:
                            - SUNDAY
                          negate: false
                      transactionEnvironments:
                        - negate: true
                          environmentCodes:
                            - ATM
                accountNumber: '5995021490907575'
                customDataGuid: >-
                  0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
            simpleRules:
              summary: Virtual Card With Simple Rules
              value:
                accountGuid: >-
                  0ENT6d8f279532fff6e27c31b2bc3e04eb59a7799ebabd130757b0129bc2fa029b2b1702046890
                expiry: 2024-11
                billingCurrency: '826'
                billingCurrencyAlphabetic: GBP
                active: true
                createdDate: '2020-10-06T11:09:42.000Z'
                lastUpdateDate: '2020-10-06T11:09:42.000Z'
                fundingSourceGuid: >-
                  0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
                ownerGuid: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
                cvc: '123'
                rules:
                  accountControl:
                    alias: Account Service Rule
                    cardLimit:
                      cardAmount: 500
                      availableBalance: 400
                      authorisationCount: 123
                    weeklyLimit:
                      cardAmount: 100
                      availableBalance: 100
                      authorisationCount: 123
                    quarterlyLimit:
                      cardAmount: 400
                      availableBalance: 300
                      authorisationCount: 123
                customDataGuid: >-
                  0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    VirtualCardAccountStatus:
      description: Virtual Card Account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardAccount'
          examples:
            virtual-card-account:
              summary: Response body payload
              value:
                accountGuid: >-
                  0ENT6d8f279532fff6e27c31b2bc3e04eb59a7799ebabd130757b0129bc2fa029b2b1702046890
                accountNumber: '523456789123456789'
                expiry: 2024-11
                billingCurrency: '826'
                billingCurrencyAlphabetic: GBP
                nameOnCard: John Doe
                fundingSourceGuid: >-
                  0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
                active: false
                createdDate: '2020-10-06T11:09:42.000Z'
                lastUpdateDate: '2020-10-06T11:09:42.000Z'
                applicationSource: bpc
                cvc: '123'
                rules:
                  accountControl:
                    alias: Account Service Rule
                    cardLimit:
                      cardAmount: 123.45
                      availableBalance: 500
                      authorisationCount: 10
                    dailyLimit:
                      cardAmount: 123.45
                      availableBalance: 10
                      authorisationCount: 10
                    weeklyLimit:
                      cardAmount: 123.45
                      availableBalance: 25
                      authorisationCount: 10
                    monthlyLimit:
                      cardAmount: 123.45
                      availableBalance: 50
                      authorisationCount: 10
                    quarterlyLimit:
                      cardAmount: 123.45
                      availableBalance: 100
                      authorisationCount: 10
                    yearlyLimit:
                      cardAmount: 123.45
                      availableBalance: 250
                      authorisationCount: 10
                    geographies:
                      countryCodes:
                        - '076'
                        - '724'
                        - '788'
                      negate: false
                    merchantCategoryCodes:
                      mccs:
                        - '3001'
                        - '3005'
                        - '3009'
                      negate: false
                transactionTolerances:
                  - currencyCode: '978'
                    cumulativeTolerancePercent: 5
                    txTolerancePercent: 5
                    cumulativeToleranceMin: 5
                    txTolerancePercentMin: 5
                    cumulativeToleranceMax: 5
                    txTolerancePercentMax: 5
    FundingSource:
      description: Funding Source
      headers:
        Location:
          $ref: '#/components/headers/Funding-Source-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FundingSource'
    FundingSourceDetails:
      description: Funding Source
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FundingSource'
    FundingSourceStatus:
      description: Funding Source
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FundingSource'
          examples:
            funding-source:
              summary: Response body payload
              value:
                fundingSourceGuid: >-
                  0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
                realCardGuid: >-
                  0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
                vcnCreationEnabled: true
                fundingSourceAlias: FundingSource1
                authorizationControlsEnabled: true
                active: false
                ownerGuid: SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
                createdDate: '2020-10-06T11:09:42.000Z'
                lastUpdateDate: '2020-10-06T11:09:42.000Z'
    Contact:
      description: Contact
      headers:
        Location:
          $ref: '#/components/headers/Contact-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Contact'
    ContactDetails:
      description: Contact
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Contact'
    UpdatedContactDetails:
      description: Updated Contact
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Contact'
          example:
            contactGuid: >-
              0ENTde2d9ef0f2c87bef87cfc932e63579b2d430a78161383d9791f1f734b1900f551701251197
            firstName: Catherine
            middleInitial: M
            lastName: Delaroche
            issuerGuid: >-
              SENTTY27A8719BE0A622F48E2A0AF1AE713171175AD8B3D4FAC64183E12F6D606385C71519036959
            corpGuid: >-
              SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            addressLine1: 8589 Lexington Drive
            addressLine2: Temple Hills
            addressLine3: Brooklyn
            poBoxNumber: '1234'
            cityName: New York
            countrySubdivisionCode: D
            postalCode: NY 11215
            countryCode: '840'
            active: true
            buildingText: The John Doe Center
            lastUpdateDate: '2023-11-29T09:51:43.635Z'
    SimpleControl:
      description: Control
      headers:
        Location:
          $ref: '#/components/headers/Real-Card-Control-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardControl'
          examples:
            fundingSourceControlSimpleRules:
              $ref: '#/components/examples/simpleRulesResponse'
            fundingSourceControlComplexRules:
              $ref: '#/components/examples/complexRulesResponse'
    SimpleControlDetails:
      description: Control
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardControl'
          examples:
            simpleControls:
              summary: Simple Control Rules
              value:
                action: APPROVE
                alias: Account Service Rule
                monthlyLimit:
                  cardAmount: 500
                  availableBalance: 500
                  authorisationCount: 10
                dailyLimit:
                  cardAmount: 500
                  availableBalance: 500
                  authorisationCount: 10
                geographies:
                  countryCodes:
                    - '076'
                    - '724'
                    - '788'
                  negate: false
                merchantCategoryCodes:
                  mccs:
                    - '3001'
                  negate: false
                startDate: '2020-10-06T11:09:42.000Z'
                endDate: '2021-10-06T11:09:42.000Z'
            complex-controls:
              summary: Complex Controls
              value:
                inControlRules:
                  - action: APPROVE
                    alias: Control Alias 1
                    velocities:
                      - maxTrans: '12'
                        cumulativeLimit: '1200'
                        period: DAILY
                        currencyType: MERCHANT
                        currencyCode: '100'
                        negate: true
                    validityPeriods:
                      - from: '2030-08-01T00:00:00.000Z'
                        to: '2035-12-31T00:00:00.000Z'
                        strictPreAuthCheck: true
                        negate: false
                    merchantCategoryCodes:
                      - negate: false
                        mccs:
                          - '3001'
                          - '3005'
                    merchantNames:
                      - negate: true
                        merchantNames:
                          - Amazon
                    approveControl:
                      negate: true
    RealCardSearch:
      description: OK
      headers:
        X-Page-Length:
          description: Page length of the paged resource
          schema:
            type: string
        X-Page-Number:
          description: Current Page number of the paged resource
          schema:
            type: string
        X-Total-Count:
          description: Total count of the paged resource
          schema:
            type: string
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/RealCardSearchResource'
          example:
            - accountGuid: >-
                0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
              expiry: 2031-11
              active: true
              createdDate: '2023-11-28T15:17:42.920Z'
              lastUpdateDate: '2023-11-28T15:17:42.920Z'
              applicationSource: bpc
              nameOnCard: John Doe
              ownerGuid: >-
                SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
              authorizationControlsEnabled: true
              accountNumber: XXXXXXXXXXXXXXX7042
              billingCurrency: '826'
              billingCurrencyAlphabetic: GBP
              corpGuid: >-
                SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
              issuerGuid: >-
                SENTTY27A8719BE0A622F48E2A0AF1AE713171175AD8B3D4FAC64183E12F6D606385C71519036959
    VirtualCardSearch:
      description: OK
      headers:
        X-Page-Length:
          description: Page length of the paged resource
          schema:
            type: string
        X-Page-Number:
          description: Current Page number of the paged resource
          schema:
            type: string
        X-Total-Count:
          description: Total count of the paged resource
          schema:
            type: string
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/VirtualCardSearchResource'
    Contacts:
      description: OK
      headers:
        X-Page-Length:
          description: Page length of the paged resource
          schema:
            type: string
        X-Page-Number:
          description: Current Page number of the paged resource
          schema:
            type: string
        X-Total-Count:
          description: Total count of the paged resource
          schema:
            type: string
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Contact'
    FundingSourceSearch:
      description: OK
      headers:
        X-Page-Length:
          description: Page length of the paged resource
          schema:
            type: string
        X-Page-Number:
          description: Current Page number of the paged resource
          schema:
            type: string
        X-Total-Count:
          description: Total count of the paged resource
          schema:
            type: string
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/FundingSource'
    AuthorizationReportStatus:
      description: Create Authorization Report
      headers:
        Location:
          $ref: '#/components/headers/Authorization-Report-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthorizationReportStatus'
    AuthorizationReport:
      description: OK
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/AuthorizationReportSummary'
    AuthorizationReportSummary:
      description: Get Authorization Report
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthorizationReportSummary'
    Authorization:
      description: Successful response
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Authorization'
    ClearingReport:
      description: Create Clearing Report
      headers:
        Location:
          $ref: '#/components/headers/Clearing-Report-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClearingReportStatus'
    ClearingReportSummaryList:
      description: Successful response
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ClearingReportSummary'
    ClearingReportSummary:
      description: Get Clearing Report
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClearingReportSummary'
    Clearing:
      description: Successful response
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Clearing'
    ClearingSummaryReportStatus:
      description: Create Clearing Summary Report
      headers:
        Location:
          $ref: '#/components/headers/Clearing-Summary-Report-Status-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClearingSummaryReportStatus'
    ClearingSummaryReportSummaryList:
      description: OK
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ClearingSummaryReportSummary'
    ClearingSummaryReportSummary:
      description: Get Clearing Summary Report
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClearingSummaryReportSummary'
    ClearingSummary:
      description: Successful response
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ClearingSummary'
    CustomData:
      description: Custom Data Fields entry response.
      headers:
        Location:
          $ref: '#/components/headers/Custom-Data-Location-Header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomData'
    CustomDataSearch:
      description: Custom Data Fields search response.
      headers:
        X-Page-Length:
          description: Page length of the paged resource
          schema:
            type: string
        X-Page-Number:
          description: Current Page number of the paged resource
          schema:
            type: string
        X-Total-Count:
          description: Total count of the paged resource
          schema:
            type: string
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/BasicCustomDataSearch'
    CustomDataBadRequestError:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWrapper'
          example:
            Errors:
              Error:
                - Source: addenda-service
                  ReasonCode: length.long
                  Recoverable: false
                  Details: customDataGuid
    RetailApiMigration:
      description: Response data for single record from migration request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RetailApiMigrationStatus'
    AccountEndUserCreated:
      description: End user created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountEndUser'
    AccountEndUser:
      description: End user
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountEndUser'
    EntitySearchResource:
      description: List of entities
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EntitySearchResource'
    Entity:
      description: Entity Details for the Authenticated User
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Entity'
  parameters:
    rc_account_guid:
      name: account_guid
      in: path
      description: The guid of the real card account being queried.
      required: true
      example: >-
        0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
      schema:
        type: string
    vc_account_guid:
      name: account_guid
      in: path
      description: The guid of the virtual card account being queried.
      required: true
      example: >-
        0ENT6d8f279532fff6e27c31b2bc3e04eb59a7799ebabd130757b0129bc2fa029b2b1702046890
      schema:
        type: string
    page:
      name: page
      in: query
      description: The page number being requested.
      example: 1
      schema:
        type: integer
        default: 0
    page_length:
      name: page_length
      in: query
      description: The length of the page being requested
      example: 10
      schema:
        type: integer
        default: 20
    unmasked_account_number:
      name: unmasked_account_number
      in: query
      description: Unmasked account number
      required: false
      example: true
      schema:
        type: boolean
    funding_source_guid:
      in: path
      name: funding_source_guid
      description: The globally unique identifier of the funding source
      required: true
      example: >-
        0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
      schema:
        type: string
    contact_guid:
      name: contact_guid
      in: path
      example: >-
        0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701951385
      description: The globally unique identifier of the Contact
      required: true
      schema:
        type: string
    offset:
      in: query
      name: offset
      example: 0
      schema:
        type: integer
        default: 0
      description: The number of items you asked the start of the list to be offset from.
    limit:
      in: query
      name: limit
      schema:
        type: integer
        default: 10
      example: 10
      description: The number of items you asked the list to be limited to.
    datalimit:
      in: query
      name: limit
      schema:
        type: integer
        default: 25
      example: 25
      description: The number of items you asked the list to be limited to.
    guid:
      name: guid
      in: path
      description: The globally unique identifier for a particular report.
      required: true
      schema:
        type: string
      example: >-
        0ENT714b012ca1964344d1a0c49b4d811e8af2c589418a636ceed6166d38e60960aa1710243081
    custom_data_guid:
      name: custom_data_guid
      in: path
      description: >-
        The globally unique identifier for a custom data collection - Auto
        generated by application on create
      required: true
      schema:
        type: string
      example: >-
        0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    descendents_guid:
      name: guid
      description: The guid of the entity for which we are searching the descendants of.
      example: >-
        0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
      in: path
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 100
    entity_type:
      name: entity_type
      description: The type of the descendant entities searched for.
      example: COMPANY
      in: query
      required: true
      schema:
        type: string
        enum:
          - COMPANY
          - COMPANY_GROUP
          - ISSUER
          - ISSUER_GROUP
    entity_guid:
      name: entity_guid
      description: >-
        A specific entity guid being searched for in the descendants of the
        entity.
      example: >-
        SENTTYD72ED5C1EC6B0275ED75AD9B4D6AF10FE0E774AD2F4C1A9BEC214FFC0466E0321613126055
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 100
    entity_name:
      name: entity_name
      description: The name of the descendant entities we're searching for.
      example: CN1902_1
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 100
    entity_status:
      name: entity_status
      description: >-
        The status of the descendant entities we're searching for. Valid values
        are ACTIVE and INACTIVE.
      example: ACTIVE
      in: query
      required: false
      schema:
        type: string
    ica:
      name: ica
      description: The ica of the descendant entities we're searching for.
      example: 1902
      in: query
      required: false
      schema:
        type: integer
        format: int64
  requestBodies:
    RealCardAccount:
      description: Real Card to be registered.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardAccount'
          examples:
            RealCardAccountDetails:
              $ref: '#/components/examples/NewRealCardAccount'
            ReplaceAccountGuid:
              $ref: '#/components/examples/ReplaceRealCardAccount'
      required: true
    RealCardAccountUpdate:
      description: Update Expiry Date Payload
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardAccount'
          example:
            accountNumber: '5569507890123457042'
            expiry: 2041-12
            nameOnCard: John Doe
            ownerGuid: >-
              SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            unmaskedAccountNumber: true
      required: true
    RealCardAccountSearch:
      required: true
      description: properties to search by
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardAccountSearch'
          examples:
            searchRealCardAccountByIssuerGuid:
              summary: Search For Real Card Accounts By Account Number
              value:
                accountNumber: '5569507890123457042'
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
            searchRealCardAccountByCorpGuid:
              summary: Search For Real Card Accounts By Corp GUID
              value:
                corpGuids:
                  - >-
                    SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
            searchRealCardAccountByAccountGuid:
              summary: Search For Real Card Accounts By Account GUID
              value:
                accountGuids:
                  - >-
                    0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
            searchRealCardAccountByMultipleParameters:
              summary: Search For Real Card Accounts By Multiple Parameters
              value:
                accountNumber: '5569507890123457042'
                corpGuids:
                  - >-
                    SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
                accountGuids:
                  - >-
                    0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
    VirtualCardStatusUpdate:
      description: Virtual card to be updated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardStatusUpdate'
          examples:
            virtualCardBlock:
              summary: Block Virtual Card
              value:
                unmaskedAccountNumber: true
                status: BLOCKED
            virtualCardUnblock:
              summary: Unblock Virtual Card
              value:
                unmaskedAccountNumber: true
                status: ACTIVE
      required: true
    VirtualCardAccountCreation:
      required: true
      description: Virtual card account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardAccount'
          examples:
            virtualCardWithComplexRules:
              $ref: '#/components/examples/virtualCardWithComplexRuleRequest'
            virtualCardWithSimpleRules:
              $ref: '#/components/examples/virtualCardWithSimpleRuleRequest'
    VirtualCardAccountUpdate:
      required: true
      description: Virtual card account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardAccount'
          examples:
            virtualCardWithComplexRule:
              summary: Virtual Card With Complex Rules
              value:
                expiry: 2024-11
                fundingSourceGuid: >-
                  0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
                unmaskedAccountNumber: true
                rules:
                  inControlRules:
                    - action: APPROVE
                      alias: Virtual Card Complex Update
                      curfews:
                        - fromTime: '06:00'
                          toTime: '11:00'
                          timeZone: MIT
                          days:
                            - SUNDAY
                          negate: false
                      geographies:
                        - countryCodes:
                            - '076'
                            - '724'
                          negate: false
                      acceptorIds:
                        - negate: false
                          acceptors:
                            - acceptorId: '123451234512344'
                              acquirerId: '123123'
                      transactionEnvironments:
                        - negate: true
                          environmentCodes:
                            - ATM
                customDataGuid: >-
                  0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
            virtualCardWithSimpleRule:
              summary: Virtual Card With Simple Rules
              value:
                expiry: 2024-11
                fundingSourceGuid: >-
                  0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
                unmaskedAccountNumber: true
                rules:
                  accountControl:
                    alias: Virtual Card Simple Rules
                    cardLimit:
                      cardAmount: 1000
                      authorisationCount: 10
                    quarterlyLimit:
                      cardAmount: 500
                      authorisationCount: 10
                    merchantCategoryCodes:
                      mccs:
                        - '3001'
                      negate: false
                    startDate: '2020-10-06T11:09:42.000Z'
                    endDate: '2021-10-06T11:09:42.000Z'
                customDataGuid: >-
                  0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
    VirtualCardAccountSearch:
      required: true
      description: Properties to search by.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualCardAccountSearch'
          examples:
            searchVirtualCardAccountByIssuerGuid:
              summary: Search For Virtual Card Accounts By Issuer GUID
              value:
                issuerGuids:
                  - SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
            searchVirtualCardAccountByCorpGuid:
              summary: Search For Virtual Card Accounts By Corp GUID
              value:
                corpGuids:
                  - >-
                    SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
            searchVirtualCardAccountByFundingSourceGuid:
              summary: Search For Virtual Card Accounts By Funding Source GUID
              value:
                fundingSourceGuids:
                  - >-
                    0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
            searchVirtualCardAccountByMultipleParameters:
              summary: Search For Virtual Card Accounts By Multiple Parameters
              value:
                issuerGuids:
                  - SENTTY557623AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
                corpGuids:
                  - >-
                    SENTTY98632405AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA
                fundingSourceGuids:
                  - >-
                    0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
    FundingSource:
      description: Funding Source to be registered.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FundingSource'
      required: true
    Contact:
      description: Contact to be registered.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Contact'
      required: true
    UpdatedContact:
      description: Updates to be made to contact
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Contact'
          example:
            firstName: Catherine
            middleInitial: M
            lastName: Delaroche
            addressLine1: 8589 Lexington Drive
            addressLine2: Temple Hills
            addressLine3: Brooklyn
            poBoxNumber: '1234'
            cityName: New York
            countrySubdivisionCode: D
            postalCode: NY 11215
            countryCode: '840'
            active: true
            buildingText: The John Doe Center
      required: true
    SimpleControl:
      description: Controls to be registered.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RealCardControl'
          examples:
            simpleRules:
              summary: Simple Control Rules
              value:
                accountControl:
                  alias: Account Service Rule
                  monthlyLimit:
                    cardAmount: 500
                    authorisationCount: 10
                  dailyLimit:
                    cardAmount: 500
                    authorisationCount: 10
                  geographies:
                    countryCodes:
                      - '076'
                      - '724'
                      - '788'
                    negate: false
                  merchantCategoryCodes:
                    mccs:
                      - '3001'
                    negate: false
                  startDate: '2020-10-06T11:09:42.000Z'
                  endDate: '2021-10-06T11:09:42.000Z'
            complexRules:
              summary: Complex Control Rules
              value:
                inControlRules:
                  - action: APPROVE
                    alias: Control Alias 1
                    velocities:
                      - maxTrans: 12
                        cumulativeLimit: 1200
                        period: DAILY
                        currencyType: MERCHANT
                        currencyCode: '100'
                        negate: true
                    validityPeriods:
                      - from: '2030-08-01T00:00:00.000Z'
                        to: '2035-12-31T00:00:00.000Z'
                        strictPreAuthCheck: true
                        negate: false
                    merchantCategoryCodes:
                      - negate: false
                        mccs:
                          - '3001'
                          - '3005'
                    merchantNames:
                      - negate: true
                        merchantNames:
                          - Amazon
                    approveControl:
                      negate: true
      required: true
    FundingSourceSearch:
      description: Properties to search by
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FundingSourceSearch'
          examples:
            searchFundingSourceByIssuerGuid:
              summary: Search For Funding Sources By Real Card GUID
              value:
                realCardGuids:
                  - >-
                    0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
            searchFundingSourceByCorpGuid:
              summary: Search For Funding Sources By Corp GUID
              value:
                corpGuids:
                  - >-
                    SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
            searchFundingSourceByAlias:
              summary: Search For Funding Sources By Alias
              value:
                fundingSourceAliases:
                  - Funding Source Alias
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
            searchFundingSourceByMultipleParameters:
              summary: Search For Funding Sources By Multiple Parameters
              value:
                realCardGuids:
                  - >-
                    0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
                corpGuids:
                  - >-
                    SENTTY13379505AC33CDA796BCBE850EADAF625FAD6B071E8D100CB1ECBEA76AD402DE1519037869
                fundingSourceAliases:
                  - Funding Source Alias
                pagination:
                  page: 0
                  pageLength: 3
                  sortingOptions:
                    - property: createdDate
                      direction: asc
      required: true
    FundingSourceStatusUpdate:
      description: Funding source to be updated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FundingSourceStatusUpdate'
      required: true
    AuthorizationReport:
      description: Authorization Report request
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthorizationReportCriteria'
    ClearingReport:
      description: Clearing Report request
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClearingReportCriteria'
    ClearingSummaryReport:
      description: Clearing Summary Report request
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ClearingSummaryReportCriteria'
    CustomData:
      description: Custom Data Fields entry to persist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomData'
      required: true
    CustomDataSearch:
      description: Custom Data Fields Search request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomDataSearch'
      required: true
    RetailApiMigration:
      description: Request body to request migrating a single record.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RetailApiMigrationToken'
      required: true
    AccountEndUser:
      description: End user contact details
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountEndUser'
  headers:
    Real-Card-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /real-card-accounts/0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
    Virtual-Card-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /virtual-card-accounts/0ENT6d8f279532fff6e27c31b2bc3e04eb59a7799ebabd130757b0129bc2fa029b2b1702046890
    Funding-Source-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /funding-sources/0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599
    Contact-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /real-card-accounts/0ENT7118cf4b2387c6e5d32e9d9fb7bcb113f9546b7d1779132bbfa25900b0f408e81701184662
          /contacts/0ENTeb9a0875b26b2518071f9a54f0d9a2ece17ffc43a065a64659f056faf5a621461701259037
    Real-Card-Control-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /funding-sources/0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766599/controls
    Authorization-Report-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /authorization-reports/0ENTb49a0ec199d9365c9565679c809fba51d41e25dbcfc1f3caaf548cfab10d33101701766501
    Clearing-Report-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /clearing-reports/0ENTfe8805dd73c93c348daccd94f4583ede0290aeb9b3c30944b91f96428cb53b9f1710243093
    Clearing-Summary-Report-Status-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /clearing-summary-reports/0ENTfe8801dd73c93c348daccd94f4583ede0960aeb9f3c30944b91f96428cb53b9f1710243095
    Custom-Data-Location-Header:
      description: The URL to retrieve the created resource
      schema:
        type: string
        example: >-
          /custom-data/0ADN14dde4804a167b7ed7b21d688a70bdf8d4e58e05e11acf0b19264903330315fe1683912115
