openapi: '3.0.1'
info: 
  version: 24.11.14
  title: Treezor API PCI DSS Endpoints
  description: PCI DSS endpoint documentation for Treezor.
  contact: 
    name: Treezor
    url: https://treezor.com
servers:
  - url: https://<your_company_name>.preprod.secure.treezor.co
    description: Sandbox environment
  - url: https://<your_company_name>.secure.treezor.co
    description: Production environment
tags:
  - name: Cards
  - name: Users
paths:
  /cards:
    post:
      tags:
        - Cards
      summary: Create Card
      operationId: createCard
      description: |
        Create a new card, which can be either virtual or physical depending on your agreement with Treezor. To use a card you will need to activate it ([`/v1/cards/{cardId}/Activate`](/guide/swagger/introduction.html#/Cards/activateCard)).
        
        This endpoint requires per-session [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: ["userId","medium","walletId","permsGroup","cardPrint"]
              properties:
                sca:
                  description: Strong Customer Authentication Proof (mandatory if not delegated mode)
                  type: string
                userId:
                  description: The unique identifier of the cardholder.
                  type: integer
                medium:
                  description: The type of card to create, depending on your agreement with Treezor.
                  type: string
                  enum:
                    - "physical"
                    - "virtual"
                walletId:
                  description: The unique identifier of the Wallet the card is attached to.
                  type: integer
                permsGroup:
                  description: |
                    Permissions defining which features are enabled for the Card. See the [Permissions Groups](/guide/cards/restrictions-limits.html#permission-groups-permsgroup) article for more information.
                  type: string
                  enum:
                    - TRZ-CU-001
                    - TRZ-CU-002
                    - TRZ-CU-003
                    - TRZ-CU-004
                    - TRZ-CU-005
                    - TRZ-CU-006
                    - TRZ-CU-007
                    - TRZ-CU-008
                    - TRZ-CU-009
                    - TRZ-CU-010
                    - TRZ-CU-011
                    - TRZ-CU-012
                    - TRZ-CU-013
                    - TRZ-CU-014
                    - TRZ-CU-015
                    - TRZ-CU-016
                accessTag:
                  description: |
                    A unique identifier used to enforce [Idempotency](/guide/api-basics/idempotency.html). Max length: 250 characters.
                  type: string
                cardTag:
                  description: |
                    This attribute is a string which can store a maximum of 250 characters that you are free to populate to suit your needs.

                    You can [read more about tags](/guide/api-basics/objects-tags.html)
                  type: string
                batchDeliveryId:
                  description: |
                    Batch delivery identifier, which value must be between `1` and `238327`.
                    
                    This feature is not enabled by default, see [Customization](/guide/cards/creation.html#batch-delivery-batchdeliveryid) for more information.
                  type: integer
                freeCustomizedInfo:
                  description: |
                    More customized text to be displayed on the card.

                    If populated, it must: 
                    * Be alphanumeric
                    * Contain at most 50 characters
                    * Not contain `!"#%'(),:;<>?@[]^` or the backtick symbol.
                  type: string
                letterCustomizedInfo:
                  description: |
                    Customized text for the letter that is joined to the card.

                    If populated, it must:
                    * Be alphanumeric
                    * Contain at most 50 characters
                    * Not contain `!"#%'(),:;<>?@[]^` or the backtick symbol.
                  type: string
                limitAtmYear:
                  description: ATM operations limit for a sliding year. No default value.
                  type: integer
                limitAtmMonth:
                  description: ATM operations limit for a sliding month. No default value.
                  type: integer
                limitAtmWeek:
                  description: ATM operations limit for a sliding week. Default value €2000.
                  type: integer
                limitAtmDay:
                  description: ATM operations limit for a single day. Default value €1000.
                  type: integer
                limitAtmAll:
                  description: ATM operations limit from beginning. No default value.
                  type: integer
                limitPaymentYear:
                  description: POS operations limit for a sliding year. No default value.
                  type: integer
                limitPaymentMonth:
                  description: POS operations limit for a sliding month. No default value.
                  type: integer
                limitPaymentWeek:
                  description: POS operations limit for a sliding week. Default value €3000.
                  type: integer
                limitPaymentDay:
                  description: POS operations limit for a single day. Default value €2000.
                  type: integer
                limitPaymentAll:
                  description: POS operations limit from beginning. No default value.
                  type: integer
                logoBackId:
                  description: |
                    The file name of the logo for the back of the card. Learn more in the [Back Logo](/guide/cards/creation.html#back-logo-logobackid) article.
                  type: string
                paymentDailyLimit:
                  description: | 
                    POS operations limit for a single day including cents. The decimal delimiter must be ".". No default value.

                    For food vouchers use cases only.
                  type: number
                  format: float
                pin:
                  description: The PIN code value of the card.
                  type: string
                cardPrint:
                  description: |
                    The [Card Program](introduction.html#card-program) to associate to the Card and the options provided with it. This information is shared with you by Treezor.
                  type: string
                anonymous:
                  description: |
                    Whether the cards are to belong to [Anonymous Users](/guide/users/physical.html#anonymous-users). If so set the value to `1`, otherwise `0`.
                    When set to `1`, there is no embossed name on the card.
                  type: integer
                sendToParent:
                  description: | 
                    Whether the card should be sent to the cardholder's Parent User. 
                    When set to `1`, the delivery address fields will be automatically filled in with the parent user's address.
                  type: integer
                mccRestrictionGroupId:
                  description: |
                    The merchant category restriction group (`mccRestrictionGroup`) to apply to the card.
                  type: integer
                merchantRestrictionGroupId:
                  description: |
                    The merchant Id restriction group (`merchantRestrictionGroupId`) to apply to the card.
                  type: integer
                countryRestrictionGroupId:
                  description: |
                    The country restriction group (`countryRestrictionGroupId`) to apply to the card.
                  type: integer
                embossLegalName:
                  description: |
                    Set to `true` to emboss the cardholder's legal name on the card.
                  default: false
                  type: boolean
                logoId:
                  description: |
                    The file name of the logo for the card. Learn more in the [Logo](/guide/cards/creation.html#logo-logoid) article.
                  type: string
                designCode:
                  description: |
                    The design code of the card. Max. 2 characters. Learn more in the [Designs](/guide/cards/creation.html#designs-designcode) article.
                  type: string
                  format: alphanumeric
                packageId:
                  type: string
                  description: Packaging reference for card shipping. Max. 8 characters.
                customizedInfo:
                  description: |
                    Customized text to be displayed on the card.

                    If populated, it must: 
                    * Be alphanumeric
                    * Contain at most 27 characters
                    * Not contain `!"#%'(),:;<>?@[]^` or the backtick symbol.
                  type: string
                deliveryMethod:
                  type: string
                  description: | 
                    The method the manufacturer uses to send the cards (e.g., delivery with or without tracking). 
                    Learn more in the [Card Delivery Method](/guide/cards/creation.html#card-delivery-method-deliverymethod) article.
                pinMailer:
                  type: integer
                  description: |
                    You can request the card manufacturer to send the card PIN code by letter.
                    Learn more in the [Pin Mailer](/guide/cards/creation.html#pin-mailer-pinmailer) article.
                  enum:
                    - 1
                    - 2
                cardLanguages:
                  description: |
                    The cardLanguages is for adding the language preference for the card.
                    Alphabetic, can't be more than 8 characters, format [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
                  type: string
                  format: alphabetic
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  cards:
                    type: array
                    items:
                      $ref: '#/components/schemas/Cards'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal error
  /cards/{cardId}/tokenize:
    post:
      tags:
        - Cards
      summary: Tokenize Card
      operationId: cardTokenize
      description: |
        Tokenize the card securely. PAN and CVV are then available using the `GET /cards/{cardId}/pan` endpoint.
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - in: path
          name: cardId
          schema:
            type: string
          required: true
          description: The unique identifier of the card.
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
              type: object
              properties:
                userId:
                  type: string
                  description: The unique identifier of the user.
      responses:
        '204':
          description: successful tokenize card data.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/assignUser:
    put:
      tags:
        - Cards
      operationId: putAssignUser
      summary: Assign User
      description: Reassign an **inactive** card from one userID to another.
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - in: path
          name: cardId
          schema:
            type: string
          description: The unique identifier of the card.
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                currentUserId:
                  type: string
                  description: |
                    Current card's user ID.
                newUserId:
                  type: string
                  description: |
                    New card's user ID.
                accessTag:
                  description: |
                    A unique identifier used to enforce [Idempotency](/guide/api-basics/idempotency.html). Max length: 250 characters.
                  type: string
      responses:
        '204':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal error
  /cards/{cardId}/cardImage:
    post:
      tags:
        - Cards
      operationId: postCardImage
      summary: Rebuild Card Image
      description: |
        Create a fresh card image ready for download. Useful when changing card design, company name, or when retrieving the image results in a 404.
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: cardId
          schema:
            type: string
          description: The unique identifier of the card.
          in: path
          required: true
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
              type: object
              properties:
                userId:
                  type: integer
                  description: The unique identifier of the cardholder.
      responses:
        '204':
          description: successful save card image.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostBadRequest'
        '500':
          description: Internal server error.
    get:
      tags:
        - Cards
      operationId: getCardImage
      summary: Get Card Image
      description: |
        Download the encrypted card image of a given cardId.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - name: cardId
          schema:
            type: string
          description: The unique identifier of the card.
          in: path
          required: true
        - name: userId
          schema:
            type: string
          description: The unique identifier of the cardholder.
          in: query
          required: true
        - name: algorithm
          schema:
            $ref: '#/components/schemas/Algorithm'
          in: query
          required: true
        - name: userPublicKey
          schema:
            $ref: '#/components/schemas/PublicKeyBase64'
          in: query
          required: true
        - name: sca
          description: |
            Strong Customer Authentication Proof (mandatory if not delegated mode)
          schema:
            type: string
          in: query
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  encryptedCardImage:
                    type: string
                    description: The base64-encoded encrypted card image.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/changePIN:
    put:
      tags:
        - Cards
      operationId: putChangePin
      summary: Change Card PIN
      description: | 
        Change the Card PIN code knowing the current one.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
        - in: path
          name: cardId
          description: The unique identifier of the card.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
                - currentPIN
                - newPIN
                - confirmPIN
                - sca
              type: object
              properties:
                userId:
                  type: string
                  description: The unique identifier of the cardholder.
                currentPIN:
                  type: string
                  description: The current PIN code of the card.
                newPIN:
                  type: string
                  description: The new PIN code of the card.
                confirmPIN:
                  type: string
                  description: The confirmation of the new PIN code of the card.              
                # accessTag:
                #   type: string
                #   description: |
                #     A unique identifier used to enforce [Idempotency](/guide/api-basics/idempotency.html). Max length: 250 characters.
                sca:
                  type: string
                  description: |
                    Strong Customer Authentication Proof (mandatory if not delegated mode).
      responses:
        '204':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal error
  /cards/{cardId}/pan:
    get:
      tags:
        - Cards
      operationId: getPAN
      summary: Get PAN & CVV
      description: |
        Get the secured Primary Account Number (PAN) and Card Validation Code (CVV) of a given card ID.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - name: cardId
          schema:
            type: string
          description: The unique identifier of the card.
          in: path
          required: true
        - name: algorithm
          schema:
            $ref: '#/components/schemas/Algorithm'
          in: query
          required: true
        - name: userId
          schema:
            type: string
          description: The unique identifier of the cardholder.
          in: query
          required: true
        - name: withCVV
          schema:
            type: boolean
          description: |
            Whether the CVV is available in addition to the PAN in the encrypted response.
          in: query
          required: false
        - name: userPublicKey
          schema:
            $ref: '#/components/schemas/PublicKeyBase64'
          in: query
          required: true
        - name: sca
          schema:
            type: string
          description: Strong Customer Authentication Proof (mandatory if not delegated mode)
          in: query
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
      responses:
        '200':
          description: successful get pan.
          content:
            application/json:
              schema:
                type: object
                properties:
                  encryptedCardData:
                    type: string
                    description: The base64-encoded encrypted card data, which includes the PAN and optionally the CVV depending on the request `withCVV` attribute value.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/pin:
    get:
      tags:
        - Cards
      operationId: getPIN
      summary: Get PIN
      description: |
        Retrieve the current secured Personal Identifier Number (PIN) of a given card.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - name: cardId
          description: The unique identifier of the card.
          schema:
            type: string
          in: path
          required: true
        - name: userPublicKey
          schema:
            $ref: '#/components/schemas/PublicKeyBase64'
          in: query
          required: true
        - name: algorithm
          schema:
            $ref: '#/components/schemas/Algorithm'
          in: query
          required: true
        - name: userId
          description: The unique identifier of the cardholder.
          schema:
            type: integer
          in: query
          required: true
        - name: sca
          description: Strong Customer Authentication Proof (mandatory if not delegated mode)
          schema:
            type: string
          in: query
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
      responses:
        '200':
          description: successful get pin.
          content:
            application/json:
              schema:
                type: object
                properties:
                  encryptedPIN:
                    type: string
                    description: |
                      The base64-encoded encrypted card PIN, which includes the PAN and optionally the CVV depending on the request `withCVV` attribute value.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/renew:
    post:
      tags:
        - Cards
      operationId: postRenew
      summary: Renew Card
      description: |
        Manually renew an active card (physical or virtual). The card status must be LOCK or UNLOCK and can not be STOLEN, LOST, DESTROYED or EXPIRED.
      parameters:
        - name: cardId
          description: The unique identifier of the card.
          schema:
            type: string
          in: path
          required: true
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
              type: object
              properties:
                userId:
                  type: string
                  description: The unique identifier of the cardholder.
                accessTag:
                  type: string
                  description: |
                    A unique identifier used to enforce [Idempotency](/guide/api-basics/idempotency.html). Max length: 250 characters.
      responses:
        '200':
          description: Successful renew card.
          content:
            application/json:
              schema:
                properties:
                  cards:
                    type: array
                    items:
                      $ref: '#/components/schemas/Cards'
        '204':
          description: Already renewed.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal error
  /cards/{cardId}/replace:
    post:
      tags:
        - Cards
      operationId: postReplace
      summary: Replace Physical Card
      description: |
        Replace a physical card with the same card data.
      parameters:
        - name: cardId
          description: The unique identifier of the card.
          schema:
            type: string
          in: path
          required: true
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
              type: object
              properties:
                userId:
                  type: string
                  description: The unique identifier of the cardholder.
                accessTag:
                  type: string
                  description: |
                    A unique identifier used to enforce [Idempotency](/guide/api-basics/idempotency.html). Max length: 250 characters.
      responses:
        '200':
          description: Successful replace card.
          content:
            application/json:
              schema:
                properties:
                  cards:
                    type: array
                    items:
                      $ref: '#/components/schemas/Cards'
        '204':
          description: Already replaced.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal error
  /cards/{cardId}/setPIN:
    put:
      tags:
        - Cards
      operationId: putSetPin
      summary: Set Card PIN
      description: |
        Overwrite the Card PIN code.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
        - name: cardId
          description: The unique identifier of the card.
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userId
                - newPIN
                - confirmPIN
                - sca
              type: object
              properties:
                userId:
                  type: string
                  description: The unique identifier of the cardholder.
                newPIN:
                  type: string
                  description: The new PIN code of the card.
                confirmPIN:
                  type: string
                  description: The confirmation of the new PIN code of the card.              
                sca:
                  type: string
                  description: |
                    Strong Customer Authentication Proof (mandatory if not delegated mode).
      responses:
        '204':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal error
  /cards/{cardId}/inappcryptogram/mastercard/apple-pay:
    post:
      tags:
        - Cards
      operationId: postInappApple
      summary: Generate Apple Pay Cryptogram (Mastercard)
      description: |
        Generate an Apple Pay cryptogram for Mastercard digitization process.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
        - name: cardId
          in: path
          description: The unique identifier of the vard.
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppleGenerateCryptogramRequest'
      responses:
        '200':
          description: successful cryptogram generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateCryptogramResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/inappcryptogram/mastercard/google-pay:
    post:
      tags:
        - Cards
      operationId: postInappGpay
      summary: Generate Google Pay Cryptogram (Mastercard)
      description: |
        Generate a Google Pay cryptogram for Mastercard digitization process.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
        - name: cardId
          in: path
          description: The unique identifier of the card.
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleGenerateCryptogramRequest'
      responses:
        '200':
          description: successful cryptogram generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateCryptogramResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/inappcryptogram/visa/apple-pay:
    post:
      tags:
        - Cards
      operationId: postVisaInappApple
      summary: Generate Apple Pay Cryptogram (Visa)
      description: |
        Generate an Apple Pay cryptogram for Visa digitization process.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
        - name: cardId
          in: path
          description: The unique identifier of the vard.
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppleGenerateCryptogramRequest'
      responses:
        '200':
          description: successful cryptogram generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateCryptogramResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /cards/{cardId}/inappcryptogram/visa/google-pay:
    post:
      tags:
        - Cards
      operationId: postVisaInappGpay
      summary: Generate Google Pay Cryptogram (Visa)
      description: |
        Generate a Google Pay cryptogram for Visa digitization process.

        This endpoint requires per-operation [SCA](/guide/strong-customer-authentication/introduction.html).
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
        - name: X-Trz-SCA
          in: header
          description: |
            Strong Customer Authentication Method (for delegated mode)
          schema:
            type: string
            enum:
            - "NONE"
            - "CONSENT"
            - "PIN"
            - "BIOMETRY"
            - "OTHERS"
            - "BIOANDPIN"
            - "SMSANDBIOMETRY"
            - "SMSANDPIN"
            - "SMSANDOTHER"
            - "MOBILEAPPANDBIOMETRY"
            - "DEVICEANDPIN"
            - "DEVICEANDBIOMETRY"
            - "SMSANDBIOANDPIN"
            - "MOBILEAPPANDBIOANDPIN"
            - "DEVICEANDBIOANDPIN"
        - name: X-Trz-SCA-ID
          in: header
          description: |
            The Strong Customer Authentication Identifier (for delegated mode)
          schema:
            type: string
        - name: cardId
          in: path
          description: The unique identifier of the card.
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sca:
                  type: string
                  description: Strong Customer Authentication Proof (mandatory if not delegated mode)
                userId:
                  type: string
                  description: User ID from Treezor.
                additionalData:
                  type: object
                  properties:
                    clientWalletProvider:
                      type: string
                      description: Client Wallet Provider is the token requestor’s ID (TRID).
                    clientWalletAccountID:
                      type: string
                      description: Client-provided consumer ID that identifies the Wallet Account Holder entity.
                    clientDeviceID:
                      type: string
                      description: Stable device identification set by Wallet Provider.
                    clientAppID:
                      type: string
                      description: Unique identifier for the client application
      responses:
        '200':
          description: successful cryptogram generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateCryptogramResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /inappcryptogram/{credentials}:
    get:
      tags:
        - Cards
      operationId: getInapp
      summary: Get Digitization Cryptogram
      description: |
        Retrieve the digitization data from the previously generated credentials. Data structures are different for each requester.
      parameters:
        - name: credentials
          schema:
            type: string
            description: Credentials to use for digitization.
          in: path
          required: true
      responses:
        '200':
          description: successful cryptogram retrieval.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveCryptogramResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '500':
          description: Internal server error.
  /users:
    post:
      tags:
        - Users
      operationId: postUsers
      summary: Create User
      description: |
        Create a new user. You may read [the dedicated documentation for this feature](/guide/users/introduction.html#creation)
      parameters:
        - in: header
          name: X-Trz-Client-Signature
          description: The base64-encoded signature of the request.
          schema:
            type: string
          required: true
        - in: header
          name: X-Trz-Client-Certificate
          description: Your base64-encoded certificate as set up with Treezor.
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          description: |
            Authorization header that contains a Bearer JWT. <br> See the [Authentication](/guide/api-basics/authentication) article for more information.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              required:
                - userTypeId
                - specifiedUSPerson
                - email
              type: object
              properties:
                userTypeId:
                  type: integer
                  description: |
                    The type of the user. May be one of the following:
                    * `1` – Natural person (default)
                    * `2` – Business entity
                    * `3` – Non - governmental organization
                    * `4` – Governmental organization

                    You may read more about [Users](/guide/users/introduction.html)
                  enum: [1, 2, 3, 4]
                userTag:
                  type: string
                  description: |
                    Custom attribute to use as you see fit. Learn more in the [Object tags](/guide/api-basics/objects-tags.html#objects-tags) article.
                    <br>Max length: 250 characters 
                    <br>Format: hc characters and `/` `!` `-` `_` `.` `*` `'` `(` `)`
                parentUserId:
                  type: integer
                  description: The unique identifier of the parent user (if any).
                parentType:
                  type: string
                  description: |
                    The type of relationship between the parent and the current users.

                    You may read more about [parent-children relationships](/guide/users/parent-children.html).
                  enum:
                    - shareholder
                    - employee
                    - leader
                specifiedUSPerson:
                  type: integer
                  description: |
                    Should be set to `1` for any citizen or resident of the United States, e.g. at least one of the following conditions is true: 
                    * `country` or `secondaryCountry` = US (the address or the secondary address is in the US)
                    * `nationality` or `nationalityOther` = US (the user has the US nationality)
                    * `birthCountry` = US (the user is born in the US)
            
                    When set to `1`, the user must have a US tax residence declared.
            
                    Should be set to `0` otherwise.
            
                    You may read more about who is considered a US Person in the [dedicated article](https://docs.treezor.com/guide/user-verification/tax-residence.html#the-specific-case-of-us-taxpayers).
                  enum: [0, 1]
                controllingPersonType:
                  type: integer
                  description: |
                    Type of relationship:
                    * `0` – None (default)
                    * `1` – Shareholder
                    * `2` – Other_relationship
                    * `3` – Director

                    You may read more about [parent-children relationships](/guide/users/parent-children.html).
                  enum: [1, 2, 3, 4]
                employeeType:
                  type: integer
                  description: | 
                    Type of user role:
                    * `0` – None (default)
                    * `1` – Leader
                    * `2` – Employee
                  enum: [1, 2, 3, 4]
                entityType:
                  type: integer
                  description: |
                    The entity type of the legal entity:
                    * `1` – Reporting Financial Institution
                    * `2` – Non-Reporting Financial Institution
                    * `3` – Active Non-Financial Entity - Governmental entities, Int. organizations
                    * `4` – Active Non-Financial Entity - Other
                    * `5` – Passive Non-Financial Entity - Investment entity that is not Participating Jurisdiction FI
                  enum: [1, 2, 3, 4, 5]
                title:
                  type: string
                  description: |
                    The title of the user, which can be one of the following:
                    * `M` – Stands for mister (Mr.)
                    * `MME` – Stands for misses (Mrs.)
                    * `MLLE` – Stands for miss
                  enum:
                    - M
                    - MME
                    - MLLE
                firstname:
                  type: string
                  description: The User first name.
                lastname:
                  type: string
                  description: The User last name.
                middleNames:
                  type: string
                  description: The User middle names, if any.
                birthday:
                  type: string
                  description: | 
                    The birth date of the User. Format: YYYY-MM-DD
                email:
                  type: string
                  description: The User email. Must be valid and unique.
                address1:
                  type: string
                  description: The User postal address (main). Cannot contain carriage return.
                address2:
                  type: string
                  description: The User postal address (complement). Cannot contain carriage return.
                address3:
                  type: string
                  description: The User postal address (complement2). Cannot contain carriage return.
                postcode:
                  type: string
                  description: The User address postcode.
                city:
                  type: string
                  description: The User address city.
                state:
                  type: string
                  description: The User address state.
                country:
                  type: string
                  description: The country of the user's address.
                  format: ISO  3166-1 alpha-2
                distributionCountry:
                  type: string
                  description: | 
                    The country in which the end user is using your services. Available values may vary depending on your configuration. Please contact Treezor to configure this feature.

                    This field is only required when you operate in multiple countries. Otherwise, it either defaults to your country or is set to `null`.
                  format: ISO 3166-1 alpha-2
                  enum:
                    - FR
                    - ES
                    - IT
                    - DE
                    - BE
                    - NL
                secondaryAddress1:
                  type: string
                  description: The User secondary postal address (main).
                secondaryAddress2:
                  type: string
                  description: The User secondary postal address (complement)
                secondaryAddress3:
                  type: string
                  description: The User secondary postal address (complement2)
                secondaryPostcode:
                  type: string
                  description: The User secondary address postcode.
                secondaryCity:
                  type: string
                  description: The User secondary address city.
                secondaryState:
                  type: string
                  description: The User secondary address state.
                secondaryCountry:
                  type: string
                  description: | 
                    The User secondary address country. Format: ISO 3166-1 alpha-2
                phone:
                  type: string
                  description: |
                    The User phone number in [international E.164 format](https://en.wikipedia.org/wiki/E.164).
                mobile:
                  type: string
                  description: |
                    The User mobile phone number in [international E.164 format](https://en.wikipedia.org/wiki/E.164).
                nationality:
                  type: string
                  description: | 
                    The User nationality. Format: ISO 3166-1 alpha-2
                nationalityOther:
                  type: string
                  description: |
                    The User other nationality. Format: ISO 3166-1 alpha-2
                placeOfBirth:
                  type: string
                  description: The User place of birth.
                birthCountry: 
                  type: string
                  description: |
                    The User country of Birth. Format: ISO 3166-1 alpha-2
                occupation:
                  type: string
                  deprecated: true
                  description: Deprecated. You must use the `occupationCategory` field instead.
                incomeRange:
                  type: string
                  description: Deprecated. Use `monthlyIncomeRange` instead.
                  deprecated: true
                  enum:
                    - 0-18
                    - 19-23
                    - 24-27
                    - 28-35
                    - 36-56
                    - 57-*
                legalName:
                  type: string
                  description: The Business legal name.
                legalRegistrationNumber:
                  type: string
                  description: The Business registration number.
                legalTvaNumber:
                  type: string
                  description: The Business VAT number.
                legalRegistrationDate:
                  type: string
                  format: date
                  description: The Business registration date.
                legalForm:
                  type: string
                  description: |
                    The legal form/category of the company. 
                    <br />
                    You may check out [the authoritative list](https://www.insee.fr/fr/information/2028129)
                legalShareCapital:
                  type: integer
                  description: The Business share capital.
                legalSector:
                  type: string
                  description: |
                    The Business Sector of the company (NAF or NACE code in France). The expected format depends on `legalSectorType`
                    <br />
                    You may check out [the authoritative list](https://www.insee.fr/fr/information/2120875)
                legalAnnualTurnOver:
                  type: string
                  description: The Business annual turnover (in k€).
                  enum:
                    - 0-39
                    - 40-99
                    - 100-249
                    - 250-999
                    - 1000-2999
                    - 3000-9999
                    - 10000-99999
                    - 100000-*
                legalNetIncomeRange:
                  type: string
                  description: The Business net income range (in k€).
                  enum:
                    - 0-4
                    - 5-9
                    - 10-49
                    - 50-149
                    - 150-499
                    - 500-*
                legalNumberOfEmployeeRange:
                  type: string
                  description: The Business number of employees.
                  enum:
                    - '0'
                    - 1-9
                    - 10-99
                    - 100-249
                    - 250-*
                effectiveBeneficiary:
                  type: integer
                  description: The effective beneficiary shares of the legal entity (e.g., for a beneficiary holding 70% of a company, value must be `70`). For shareholders only.
                language: 
                  type: string
                  description: |
                    The User preferred language. Format: ISO 639-1
                taxNumber:
                  type: string
                  deprecated: true
                  description: Deprecated. Your must use the `taxResidence` endpoint.
                taxResidence:
                  type: string
                  deprecated: true
                  description: Deprecated. Your must use the `taxResidence` endpoint.
                position:
                  type: string
                  description: The geographic activity coverage (for NGOs only).
                personalAssets:
                  type: string
                  description: Deprecated. You must use `personalAssetsRange` instead.
                  deprecated: true
                  enum:
                    - 0-2
                    - 3-22
                    - 23-128
                    - 129-319
                    - 320-464
                    - 465-
                personalAssetsRange:
                  type: integer
                  description: |
                    The personal assets range of the user. See [Personal Assets Range](/guide/users/physical.html#personal-assets-range-personalassetsrange) for the list of values.
                  enum: [0,1,2,3,4,5,6,7]
                activityOutsideEu:
                  type: integer
                  description: |
                    For Users obligated to complete a due diligence questionnaire regarding sanctions and embargoes. 

                    Whether the entity and its business units, subsidiaries, and joint ventures have a commercial activity outside of the European Union.

                    Can be:
                    * `0` – False
                    * `1` – True. When set to this value, the next attributes become mandatory. 

                    See the [Sanctions and embargo](/guide/users/legal-entity.html#sanctions-and-embargo) article for more information.
                  enum:
                    - 0
                    - 1
                economicSanctions:
                  type: integer
                  description: |
                    For Users obligated to complete a due diligence questionnaire regarding sanctions and embargoes, and for which the `activityOutsideEu` value is set to `1`.

                    Whether the entity, its subsidiaries, entities, employees, directors, beneficial owners, or joint ventures are subject to Economic Sanctions.

                    Can be:
                    * `0` – False
                    * `1` – True 

                    See the [Sanctions and embargo](/guide/users/legal-entity.html#sanctions-and-embargo) article for more information.
                  enum:
                    - 0
                    - 1
                residentCountriesSanctions:
                  type: integer
                  description: |
                    For Users obligated to complete a due diligence questionnaire regarding sanctions and embargoes, and for which the `activityOutsideEu` value is set to `1`.

                    Whether the entity, its subsidiaries, or joint ventures, located within or operating from any countries or territories are subject to Comprehensive Sanctions. 

                    Can be:
                    * `0` – False
                    * `1` – True 

                    See the [Sanctions and embargo](/guide/users/legal-entity.html#sanctions-and-embargo) article for more information.
                  enum:
                    - 0
                    - 1
                involvedSanctions:
                  type: integer
                  description: |
                    For Users obligated to complete a due diligence questionnaire regarding sanctions and embargoes, and for which the `activityOutsideEu` value is set to `1`.

                    Whether the entity, its subsidiaries, or joint ventures, are engaged in transactions, investments, business, or other dealings that directly or indirectly involve or benefit:
                    * Any countries or territories subject to Comprehensive Sanctions (Cuba, Iran, North Korea, Syria, Crimea, Ukrainian Oblasts not controlled by the government, or Russia), or 
                    * Any person or entity which is the target of any Sanctions (“Sanctioned Targets”).

                    Can be:
                    * `0` – False
                    * `1` – True 

                    See the [Sanctions and embargo](/guide/users/legal-entity.html#sanctions-and-embargo) article for more information.
                  enum:
                    - 0
                    - 1
                entitySanctionsQuestionnaire:
                  type: integer
                  description: |
                    For Users obligated to complete a due diligence questionnaire regarding sanctions and embargoes, and for which the `activityOutsideEu` value is set to `1`.

                    Defines the scope to which the `activityOutsideEu` field applies:
                    * `0` – Not applicable
                    * `1` – Only the legal entity
                    * `2` – The legal entity and all its subsidiaries held at 100%
                    * `3` – The legal entity and all its subsidiaries held at 50% or more
                    * `4` – The legal entity and a list of subsidiaries

                    See the [Sanctions and embargo](/guide/users/legal-entity.html#sanctions-and-embargo) article for more information.

                  enum: [0, 1, 2, 3, 4]
                timezone:
                  type: string
                  description: |
                    The User timezone in the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format.
                    The timezones have unique names in the form "Area/Location" (e.g. "America/New_York", "Europe/Paris").

                    It may be used to enforce a card `paymentDailyLimit` based on the cardholder's timezone.
                occupationType:
                  type: string
                  deprecated: true
                  description: Deprecated. Use `occupationCategory` instead.
                  enum:
                    - self_employed
                    - public_sector_employees
                    - private_sector_employees
                    - retired_people_and_students
                    - without_any_professional_activity
                sourceOfFunds:
                  type: string
                  description: The source of funds for opening an account for a company or self-employed person.
                  enum: 
                    - donation
                    - inheritance
                    - loan 
                    - lottery
                    - pension
                    - proceeds_from_investment
                    - proceeds_from_sale
                    - salary
                    - savings
                legalSectorType:
                  type: string
                  description: |
                    Qualify the type of data in the `legalSector` field:
                    * If it is set to NACE the legalSector needs to be in a NACE format (4 digits). 
                    * If it is set to NAF (or not set at all) the legalSector needs to be in a NAF format (4 digits followed by a capital letter).
                  enum:
                    - NAF
                    - NACE
                isOnStockExchange:
                  type: integer
                  description: |
                    The user is a corporation and is quoted on an organized stock exchange.
                    * `0` – No
                    * `1` – Yes
                  enum: [0, 1]
                webauthn:
                  type: string
                  description: |
                    The `PublicKeyCredential` after the WebAuthn Register, encoded in base64.

                    See the Web Native article, [Device enrollment](/guide/strong-customer-authentication/web-native.html#device-enrollment) section for more information.
                passcode:
                  type: string
                  description: |
                    Required if the `webauthn` field is provided. Must be base64 encoded and encrypted.

                    See the Web Native article, [Device enrollment](/guide/strong-customer-authentication/web-native.html#device-enrollment) section for more information.'
                occupationCategory:
                  type: integer
                  description: |
                    Type of occupation of the user. See [Occupation Category](/guide/users/physical.html#occupation-category-occupationcategory) for the list of values.
                  enum: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
                monthlyIncomeRange:
                  type: integer
                  description: |
                    Net monthly income of the user. See [Monthly Income Range](/guide/users/physical.html#monthly-income-range-monthlyincomerange) for the list of values.
                  enum: [0,1,2,3,4,5,6,7]
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserObject'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListErrors'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
  schemas:
    Algorithm:
      type: string
      description: |
        Algorithm used to cipher.
      enum: [ "OPENPGP_ARMOR", "LIBSODIUM_HEX" ]
    Cards:
      type: object
      properties:
        cardId:
          type: integer
          description: The unique identifier of the card.
        userId:
          type: integer
          description: The unique identifier of the cardholder.
        walletId:
          type: integer
          description: The unique identifier of the Wallet the card is attached to.
        walletCardtransactionId:
          type: integer
        mccRestrictionGroupId:
          type: integer
          description: |
            The merchant category restriction group (`mccRestrictionGroup`) applied to the card.
        merchantRestrictionGroupId:
          type: integer
          description: |
            The merchant Id restriction group (`merchantRestrictionGroupId`) applied to the card.
        countryRestrictionGroupId:
          type: integer
          description: |
            The country restriction group (`countryRestrictionGroupId`) applied to the card.
        publicToken:
          type: string
        cardTag:
          type: string
        statusCode:
          type: string
          enum: [ 'UNLOCK', 'LOCK', 'LOST', 'STOLEN', 'DESTROYED', 'LOCK_INTERNAL', 'EXPIRED' ]
        isLive:
          type: integer
        pinTryExceeds:
          type: integer
        maskedPan:
          type: integer
        embossedName:
          type: string
        expiryDate:
          type: string
          description: | 
            The date on which the card expires. 
            
            The [`card.expiryAlert`](/guide/cards/events.md#structure-of-a-card-expiryalert) webhook is sent a month before the `expiryDate` for you to anticipate [Renewal](/guide/cards/renewal.html).
            
            Format: YYYY-MM-DD 
        CVV:
          type: string
        startDate:
          type: string
          description: Date YYYY-MM-DD
        endDate:
          type: string
          description: Date YYYY-MM-DD
        countryCode:
          type: string
        currencyCode:
          type: string
          description: Inherited from the cardholder's country.
        lang:
          type: string
          description: Inherited from the cardholder's language.
        deliveryTitle:
          type: string
        deliveryLastname:
          type: string
        deliveryFirstname:
          type: string
        deliveryAddress1:
          type: string
        deliveryAddress2:
          type: string
        deliveryAddress3:
          type: string
        deliveryCity:
          type: string
        deliveryPostcode:
          type: string
        deliveryCountry:
          type: string
        mobileSent:
          type: string
          description: Inherited from the cardholder' phone.
        limitsGroup:
          type: string
        permsGroup:
          type: string
        cardDesign:
          type: string
        virtualConverted:
          type: integer
          description: |
            Whether or not the card is a Virtual Card that has been converted into a Physical Card. Values can be:
              * `1` – Physical card converted from a virtual card
              * `0` – Not converted, virtual card only
          enum: [0, 1]
        optionAtm:
          type: integer
        optionForeign:
          type: integer
        optionOnline:
          type: integer
        optionNfc:
          type: integer
        limitAtmYear:
          type: integer
        limitAtmMonth:
          type: integer
        limitAtmWeek:
          type: integer
        limitAtmDay:
          type: integer
        limitAtmAll:
          type: integer
        limitPaymentYear:
          type: integer
        limitPaymentMonth:
          type: integer
        limitPaymentWeek:
          type: integer
        limitPaymentDay:
          type: integer
        limitPaymentAll:
          type: integer
        paymentDailyLimit:
          type: number
          format: float
        restrictionGroupLimits:
          type: array
          items:
            type: object
            properties:
              paymentDailyLimit:
                type: number
                format: float
                minimum: 0
                exclusiveMinimum: true
              mccRestrictionGroups:
                type: integer
                format: int64
                minimum: 0
                exclusiveMinimum: true
              countryRestrictionGroups:
                type: integer
                format: int64
                minimum: 0
                exclusiveMinimum: true
              merchantIdRestrictionGroups:
                type: integer
                format: int64
                minimum: 0
                exclusiveMinimum: true
          minItems: 1
        totalAtmYear:
          type: integer
        totalAtmMonth:
          type: integer
        totalAtmWeek:
          type: integer
        totalAtmDay:
          type: integer
        totalAtmAll:
          type: integer
        totalPaymentYear:
          type: integer
        totalPaymentMonth:
          type: integer
        totalPaymentWeek:
          type: integer
        totalPaymentDay:
          type: integer
        totalPaymentAll:
          type: integer
        createdBy:
          type: integer
        createdDate:
          type: string
          description: Date YYYY-MM-DD HH:MM:SS
        modifiedBy:
          type: integer
        modifiedDate:
          type: string
          description: Date YYYY-MM-DD HH:MM:SS
        renewalType:
          type: string
          description: |
            Indicates how the Card is to be renewed. `A` for automatic renewal, `N` for non-automatic renewal.
          enum: ["A", "N"]
        renewalDate:
          type: string
          description: Date on which the card was renewed (field populated for the original card only). YYYY-MM-DD.
        originalCardId:
          type: integer
          description: The unique identifier of the original Card (field populated for renewed cards only).
        cancellationNumber:
          type: string
          description: | 
            Number generated when the card `statusCode` is set to `STOLEN` or `LOST`.
        totalRows:
          type: integer
    UserObject:
      type: object
      properties:
        users:
          type: array
          items:
            type: object
            properties:
              userId:
                type: integer
                description: The unique identifier of the User.
              userStatus:
                type: string
                enum:
                  - PENDING
                  - CANCELED
                  - VALIDATED
              userTag:
                type: string
              parentUserId:
                type: integer
              parentType:
                type: string
                enum:
                  - shareholder
                  - employee
                  - leader
              controllingPersonType:
                type: integer
              employeeType:
                type: integer
              specifiedUSPerson:
                type: integer
              title:
                type: string
                enum:
                  - M
                  - MME
                  - MLLE
              firstname:
                type: string
              lastname:
                type: string
              middleNames:
                type: string
              birthday:
                type: string
              email:
                type: string
              address1:
                type: string
              address2:
                type: string
              address3:
                type: string
              postcode:
                type: string
              city:
                type: string
              state:
                type: string
              country:
                type: string
                format: ISO 3166-1 alpha-2
              countryName:
                type: string
              distributionCountry:
                type: string
                description: | 
                  The country in which the end user is using your services.
                format: ISO 3166-1 alpha-2
                enum:
                  - FR
                  - ES
                  - IT
                  - DE
                  - BE
                  - NL
              secondaryAddress1:
                type: string
              secondaryAddress2:
                type: string
              secondaryAddress3:
                type: string
              secondaryPostcode:
                type: string
              secondaryCity:
                type: string
              secondaryState:
                type: string
              secondaryCountry:
                type: string
                description: Format ISO 3166-1 alpha-2
              phone:
                type: string
              mobile:
                type: string
              nationality:
                type: string
                description: Format ISO 3166-1 alpha-2
              nationalityOther:
                type: string
                description: Format ISO 3166-1 alpha-2
              placeOfBirth:
                type: string
              birthCountry:
                type: string
                description: Format ISO 3166-1 alpha-2
              occupation:
                type: string
                deprecated: true
                description: deprecated
              incomeRange:
                type: string
                deprecated: True
              legalName:
                type: string
              legalNameEmbossed:
                type: string
              legalRegistrationNumber:
                type: string
              legalTvaNumber:
                type: string
              legalRegistrationDate:
                type: string
                description: Date YYYY-MM-DD
              legalForm:
                type: string
              legalShareCapital:
                type: integer
              legalSector:
                type: string
              legalAnnualTurnOver:
                type: string
              legalNetIncomeRange:
                type: string
              legalNumberOfEmployeeRange:
                type: string
              effectiveBeneficiary:
                type: integer
              kycLevel:
                type: integer
                description: |
                  * `0` – NONE
                  * `1` – LIGHT
                  * `2` – REGULAR
                  * `3` – STRONG
                  * `4` – REFUSED
                  * `5` – PREVALIDATED
                  * `6` – ENHANCED
                enum: [0, 1, 2, 3, 4, 5, 6]
              kycReview:
                type: integer
                description: |
                  * `0` – NONE
                  * `1` – PENDING
                  * `2` – VALIDATED
                  * `3` – REFUSED
                  * `4` – INVESTIGATING (deprecated)
                  * `5` – CLOSED (deprecated)
                  * `6` – REVIEW_OPEN
                  * `7` – REVIEW_PENDING
                enum: [0, 1, 2, 3, 6, 7]
              kycReviewComment:
                type: string
                description: |
                  A comment set by Treezor upon [KYC review](/guide/user-verification/introduction.html). It concatenates information for each KYC Review update, with the date, the `kycReview` and `kycLevel` values, and the comment from Treezor.
              isFreezed:
                type: integer
                deprecated: true
                description: deprecated
              isFrozen:
                type: integer
              language:
                type: string
              optInMailing:
                type: integer
              sepaCreditorIdentifier:
                type: string
                description: |
                  The 13-character long [SEPA Creditor Identifier](/guide/overview/glossary.html#sepa-creditor-identifier-sci) of the User.
                readOnly: true
              taxNumber:
                type: string
                deprecated: true
              taxResidence:
                type: string
                deprecated: true
              position:
                type: string
              personalAssets:
                type: string
                deprecated: True
              personalAssetsRange:
                  type: integer
                  description: |
                    The personal assets range of the user. See [Personal Assets Range](/guide/users/physical.html#personal-assets-range-personalassetsrange) for the list of values.
                  enum: [0,1,2,3,4,5,6,7]
              activityOutsideEu:
                type: integer
                description:   Whether the entity and its business units, subsidiaries, and joint ventures have a commercial activity outside of the European Union.
              economicSanctions:
                type: integer
                description: Whether the entity, its subsidiaries, entities, employees, directors, beneficial owners, or joint ventures are subject to Economic Sanctions.
              residentCountriesSanctions:
                type: integer
                description: Whether the entity, its subsidiaries, or joint ventures, located within or operating from any countries or territories are subject to Comprehensive Sanctions.
              involvedSanctions:
                type: integer
                description: |
                  Whether the entity, its subsidiaries, or joint ventures, are engaged in transactions, investments, business, or other dealings that directly or indirectly involve or benefit:
                  * Any countries or territories subject to Comprehensive Sanctions, or
                  * Any person or entity which is the target of any Sanctions (“Sanctioned Targets”).
              entitySanctionsQuestionnaire:
                  type: integer
                  description: |
                    Defines the scope to which the `activityOutsideEu` field applies.
                  enum: [0, 1, 2, 3, 4]
              sanctionsQuestionnaireDate:
                type: string
                description: Date YYYY-MM-DD HH:MM:SS
              timezone:
                type: string
              occupationType:
                type: string
                description: Deprecated. Use `occupationCategory` instead.
                deprecated: True
                enum:
                  - self_employed
                  - public_sector_employees
                  - private_sector_employees
                  - retired_people_and_students
                  - without_any_professional_activity
              sourceOfFunds:
                type: string
                description: The source of funds for opening an account for a company or self-employed person
                enum: 
                  - donation
                  - inheritance
                  - loan 
                  - lottery
                  - pension
                  - proceeds_from_investment
                  - proceeds_from_sale
                  - salary
                  - savings
              legalSectorType:
                type: string
                description: | 
                  Qualify the type of data in the `legalSector` field 
                    * If it is set to NACE the legalSector needs to be in a NACE format (4 digits). 
                    * If it is set to NAF (or not set at all) the legalSector needs to be in a NAF format (4 digits followed by a capital letter).
                enum:
                  - NAF
                  - NACE
              isOnStockExchange:
                type: integer
                description: |
                  The user is a corporation and is quoted on an organized stock exchange.
                    * `0` – No
                    * `1` – Yes
              createdDate:
                type: string
                description: Date YYYY-MM-DD HH:MM:SS
              modifiedDate:
                type: string
                description: Date YYYY-MM-DD HH:MM:SS
              walletCount:
                type: integer
              payinCount:
                type: integer
              totalRows:
                type: integer
              occupationCategory:
                type: integer
                description: |
                  Type of occupation of the user. See [Occupation Category](/guide/users/physical.html#occupation-category-occupationcategory) for the list of values.
                enum: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
              monthlyIncomeRange:
                type: integer
                description: |
                  Net monthly income of the user. See [Monthly Income Range](/guide/users/physical.html#monthly-income-range-monthlyincomerange) for the list of values.
                enum: [0,1,2,3,4,5,6,7]
    Errors:
      type: array
      description: |
        Errors is an array of objects indicates that the server cannot understand or process the request due to a client side error.
      items:
        properties:
          type:
            type: string
            example: invalid_request
          code:
            type: string
            example: input_validation_error
          message:
            type: string
            description: Error description for human use. Content subject to change without notice.
          docUrl:
            type: string
            example: https://www.treezor.com/api-documentation/#/card/get_cards__id_
    AppleGenerateCryptogramRequest:
      type: object
      properties:
        sca:
          description: Strong Customer Authentication Proof (mandatory if not delegated mode)
          type: string
        userId:
          type: string
          description: User ID from Treezor.
        additionalData:
          type: object
          description: Object required only for requester Apple Pay. otherwise, it is ignored.
          properties:
            certificateChain:
              type: array
              description: Certificate chain from Apple Pay.
              items:
                type: string
            nonce:
              type: string
              description: Nonce from Apple Pay.
            nonceSignature:
              type: string
              description: Nonce signature from Apple Pay.
    GoogleGenerateCryptogramRequest:
      type: object
      properties:
        sca:
          type: string
          description: Strong Customer Authentication Proof (mandatory if not delegated mode)
        userId:
          type: string
          description: User ID from Treezor.
    GenerateCryptogramResponse:
      type: object
      description: Contains a token that will be used by requesters with inapp digitization
      properties:
        credentials:
          type: string
          description: Credentials to use for digitization.
    ListErrors:
      type: object
      properties:
        errors:
          $ref: '#/components/schemas/Errors'
    PostBadRequest:
      type: object
      description: |
        Indicates that the server cannot understand or process the request due to a client side error.
      properties:
        errors:
          $ref: '#/components/schemas/Errors'
        wsId:
          type: string
          example: "2021123456789"
        actionCode:
          type: string
          example: "999"
    PublicKeyBase64:
      type: string
      description: |
        Public key base64-encoded.
        | Chosen Algorithm in request | Minimum key size         |
        | --------------------------- | ------------------------ |
        | OPENPGP_ARMOR               | RSA 2048 bits            |
        | LIBSODIUM_HEX               | Elliptic Curve 256 bits  |
    RetrieveCryptogramResponse:
      type: object
      description: Contains digitization data.
      properties:
        issuerInitiatedDigitizationData:
          type: string
          description: |
            base64-encoded json digitization data.
            Once issuerInitiatedDigitizationData content base64 decoded, you will have:
            - Apple: {"activationData" : "BASE64_ENCODED_CONTENT", encryptedPassData : "BASE64_ENCODED_CONTENT", ephemeralPublicKey : "BASE64_ENCODED_CONTENT"}
            - Other: {"cardInfo":{"publicKeyFingerprint":"value","encryptedKey":"value","oaepHashingAlgorithm":"value","iv":"value","encryptedData":"value"},"tokenizationAuthenticationValue":"value"}
security:
  - bearerAuth: []
  - ApiKeyAuth: []
